diff --git a/README.md b/README.md index 7a5be55..7712460 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,21 @@ ParkenDD ======== -Android App for parking spots in Dresden. -If you want to contribute a translation be free to do so on [poeditor.com](https://poeditor.com/join/project/eu2wqvnR4z). +An android application to find free parking sports in Dresden and other cities. - -Get it on F-Droid - -Get it on Google Play +Get it on F-Droid +Get it on Google Play -This app shows the free parking lots in Dresden with the possibility to view them with a maps application. +## Features +![Different screenshots of ParkenDD: the main list of parking spots, a forecast showing how many places are available at a certain date and a map of Dresden and its free parking spots.](resources/readmeScreenshots/assortment.png) +* See how many free places are available in the parking spots near you +* Find out how busy parking spots will be at a certain date and time +* Display a map showing all your city's parking spots +## Translation +ParkenDD is available in several languages including English, German and French. +If you want to contribute a translation be free to do so on [poeditor.com](https://poeditor.com/join/project/eu2wqvnR4z)! + +## Licenses Licenses can be viewed in the files LICENSE and LICENSE-EXTRA. -![screen](http://jkliemann.de/parkendd/media/parkendd4.png "screenshot") diff --git a/app/build.gradle b/app/build.gradle index fbfc5db..e2cbc57 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 22 + compileSdkVersion 25 buildToolsVersion '25.0.0' defaultConfig { applicationId "de.jkliemann.parkendd" minSdkVersion 14 - targetSdkVersion 22 - versionCode 28 - versionName "1.2.3" + targetSdkVersion 25 + versionCode 27 + versionName "1.2.2" } buildTypes { release { @@ -24,12 +24,12 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:22.2.1' - compile 'com.android.support:support-v4:22.2.1' - compile 'com.android.support:design:22.2.1' + compile 'com.android.support:appcompat-v7:25.4.0' + compile 'com.android.support:support-v4:25.4.0' + compile 'com.android.support:design:25.4.0' compile 'org.piwik.sdk:piwik-sdk:0.0.3' compile 'org.osmdroid:osmdroid-android:5.0.1@aar' compile 'com.android.support.constraint:constraint-layout:1.0.2' - compile 'com.android.support:recyclerview-v7:22.2.1' - compile 'com.android.support:cardview-v7:22.2.1' + compile 'com.android.support:recyclerview-v7:25.4.0' + compile 'com.android.support:cardview-v7:25.4.0' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3434557..a34d895 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,7 +13,8 @@ > spotmap; private Date date; + private int previousGroup = -1; + ProgressBar pg; ParkingSpot[] spotList; Loader forecastLoader; @@ -89,15 +89,10 @@ public void onCreate(Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_forecast, container, false); - relativeLayout = (RelativeLayout) view.findViewById(R.id.RelativeLayout); - datePickerLayout = (RelativeLayout) view.findViewById(R.id.datePickerLayout); - datePickerLayout.setVisibility(View.INVISIBLE); - mView = view; - + setupDateText(); + setupHourText(); setupProgressBar(); - setupOkButton(); - setupCancelButton(); setupTimePicker(); ((ParkenDD) getActivity().getApplication()).getTracker().trackScreenView("/forecast/" + city.id(), "Vorhersage-" + city.name()); return view; @@ -147,7 +142,7 @@ public void onLoaderFinished(String[] data, Loader instance) { spotmap.put(spotList[i], dateMap); } - updateList(timePicker.getCurrentHour()); + updateTimeGUIElements(date); onProgressUpdated(); } @@ -163,33 +158,37 @@ private void setupProgressBar() { pg.setIndeterminate(true); } - private void setupOkButton() { - Button okButton = (Button)mView.findViewById(R.id.okbutton); - okButton.setOnClickListener(this); - } - - private void setupCancelButton() { - Button cancelButton = (Button)mView.findViewById(R.id.cancelbutton); - cancelButton.setOnClickListener(this); - } - private void setupTimePicker() { Calendar cal = Calendar.getInstance(); - date = new Date(cal.get(Calendar.YEAR) - dateOffset, cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)); + date = new Date(cal.get(Calendar.YEAR) - DATE_OFFSET, cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), + cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE)); TimeZone tz = Calendar.getInstance().getTimeZone(); dateFormat = android.text.format.DateFormat.getDateFormat(getActivity()); dateFormat.setTimeZone(tz); - String locDate = dateFormat.format(date); - city = ((ParkenDD) getActivity().getApplication()).currentCity(); - getActivity().setTitle(city.name() + " - " + locDate); - loadDate(); - timePicker = (TimePicker)mView.findViewById(R.id.timePicker); - timePicker.setIs24HourView(true); - timePicker.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() { + + updateDateGUIElements(date); + updateTimeGUIElements(date); + } + + private void setupDateText() { + displayedDate = (TextView) mView.findViewById(R.id.dateText); + + displayedDate.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + openDatePicker(); + } + }); + } + + private void setupHourText() { + displayedTime = (TextView) mView.findViewById(R.id.hourText); + + displayedTime.setOnClickListener(new View.OnClickListener() { @Override - public void onTimeChanged(TimePicker view, int hourOfDay, int minute) { - updateList(hourOfDay); + public void onClick(View view) { + openTimePicker(); } }); } @@ -249,7 +248,15 @@ private void updateList(int hour){ } private void setList(ArrayList spots){ - ExpandableListView spotView = (ExpandableListView)mView.findViewById(R.id.listView); + final ExpandableListView spotView = (ExpandableListView)getView().findViewById(R.id.listView); + spotView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() { + @Override + public void onGroupExpand(int groupPosition) { + if(groupPosition != previousGroup) + spotView.collapseGroup(previousGroup); + previousGroup = groupPosition; + } + }); String sortOptions[] = getResources().getStringArray(R.array.setting_sort_options); String sortPreference = PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("sorting", sortOptions[0]); Boolean hide_closed = PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("hide_closed", true); @@ -316,45 +323,83 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { { menu.clear(); } - inflater.inflate(R.menu.menu_forecast, menu); super.onCreateOptionsMenu(menu,inflater); } + private void updateDateGUIElements(Date aDate) { + loadDate(); + + String locDate = dateFormat.format(aDate); + city = ((ParkenDD) getActivity().getApplication()).currentCity(); + getActivity().setTitle(city.name() + " - " + locDate); + displayedDate.setText(locDate); + } + + private void updateTimeGUIElements(Date aDate) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.HOUR_OF_DAY, aDate.getHours()); + cal.set(Calendar.MINUTE, aDate.getMinutes()); + displayedTime.setText(formatTime(cal)); + + updateList(cal.get(Calendar.HOUR_OF_DAY)); + } + + private void openDatePicker() { + Calendar c = Calendar.getInstance(); + c.setTime(date); + int year = c.get(Calendar.YEAR); + int month = c.get(Calendar.MONTH); + int day = c.get(Calendar.DAY_OF_MONTH); + + DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), this, year, month, day); + datePickerDialog.show(); + } + + private void openTimePicker() { + Calendar c = Calendar.getInstance(); + c.setTime(date); + int hourOfDay = c.get(Calendar.HOUR_OF_DAY); + int minute = c.get(Calendar.MINUTE); + + TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(),this,hourOfDay, minute, true); + timePickerDialog.show(); + } + @Override - public boolean onOptionsItemSelected(MenuItem item) { - // Handle action bar item clicks here. The action bar will - // automatically handle clicks on the Home/Up button, so long - // as you specify a parent activity in AndroidManifest.xml. - int id = item.getItemId(); - - //noinspection SimplifiableIfStatement - if (id == R.id.action_datePicker) { - relativeLayout.setVisibility(View.INVISIBLE); - datePickerLayout.setVisibility(View.VISIBLE); - return true; - } + public void onDateSet(DatePicker datePicker, int i, int i1, int i2) { + date = new Date(datePicker.getYear() - DATE_OFFSET, datePicker.getMonth(), datePicker.getDayOfMonth()); - return super.onOptionsItemSelected(item); + updateDateGUIElements(date); } @Override - public void onClick(View view) { - switch (view.getId()) { - case R.id.okbutton : - relativeLayout.setVisibility(View.VISIBLE); - datePickerLayout.setVisibility(View.INVISIBLE); - DatePicker datePicker = (DatePicker) datePickerLayout.findViewById(R.id.datePicker); - date = new Date(datePicker.getYear() - dateOffset, datePicker.getMonth(), datePicker.getDayOfMonth()); - loadDate(); - String locDate = dateFormat.format(date); - getActivity().setTitle(city.name() + " - " + locDate); - break; - - case R.id.cancelbutton: - relativeLayout.setVisibility(View.VISIBLE); - datePickerLayout.setVisibility(View.INVISIBLE); - break; - } + public void onTimeSet(TimePicker timePicker, int i, int i1) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.set(Calendar.HOUR_OF_DAY, timePicker.getCurrentHour()); + cal.set(Calendar.MINUTE, timePicker.getCurrentMinute()); + date = new Date(cal.get(Calendar.YEAR) - DATE_OFFSET, cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), + cal.get(Calendar.HOUR_OF_DAY),cal.get(Calendar.MINUTE)); + + updateTimeGUIElements(date); + } + + private String formatTime(Calendar cal) { + int hours = cal.get(Calendar.HOUR_OF_DAY); + String hoursText; + if(hours < 10) + hoursText = "0" + hours; + else + hoursText = hours + ""; + + int minutes = cal.get(Calendar.MINUTE); + String minutesText; + if(minutes < 10) + minutesText = "0" + minutes; + else + minutesText = minutes + ""; + + return hoursText + ":" + minutesText; } /** diff --git a/app/src/main/java/de/jkliemann/parkendd/Views/Main/LocalParkingSlotListFragment.java b/app/src/main/java/de/jkliemann/parkendd/Views/Main/LocalParkingSlotListFragment.java index 7a4d0f5..3fa4adf 100644 --- a/app/src/main/java/de/jkliemann/parkendd/Views/Main/LocalParkingSlotListFragment.java +++ b/app/src/main/java/de/jkliemann/parkendd/Views/Main/LocalParkingSlotListFragment.java @@ -51,6 +51,8 @@ public class LocalParkingSlotListFragment extends Fragment implements LoaderInte private OnFragmentInteractionListener mListener; + private int previousGroup = -1; + public LocalParkingSlotListFragment() { // Required empty public constructor } @@ -133,7 +135,15 @@ private void updateCities(ArrayList citylist){ } private void setList(City CITY){ - ExpandableListView spotView = (ExpandableListView)getView().findViewById(R.id.spotListView); + final ExpandableListView spotView = (ExpandableListView)getView().findViewById(R.id.spotListView); + spotView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() { + @Override + public void onGroupExpand(int groupPosition) { + if(groupPosition != previousGroup) + spotView.collapseGroup(previousGroup); + previousGroup = groupPosition; + } + }); String sortOptions[] = getResources().getStringArray(R.array.setting_sort_options); String sortPreference = PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("sorting", sortOptions[0]); Boolean hide_closed = PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("hide_closed", true); diff --git a/app/src/main/java/de/jkliemann/parkendd/Views/Main/MainActivity.java b/app/src/main/java/de/jkliemann/parkendd/Views/Main/MainActivity.java index bb067d3..c89b0c9 100644 --- a/app/src/main/java/de/jkliemann/parkendd/Views/Main/MainActivity.java +++ b/app/src/main/java/de/jkliemann/parkendd/Views/Main/MainActivity.java @@ -76,7 +76,7 @@ private void setUpNavigationDrawer() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.open, R.string.closed); - drawer.setDrawerListener(toggle); + drawer.addDrawerListener(toggle); toggle.syncState(); @@ -159,14 +159,15 @@ public boolean onCreateOptionsMenu(Menu menu) { private void setupSearchView(Menu menu) { final SearchView search = (SearchView) menu.findItem(R.id.action_search).getActionView(); - + search.setQueryHint(getResources().getString(R.string.search_hint)); search.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String s) { setFragment(RemoteParkingSlotListFragment.newInstance(s)); - search.setQuery("", false); + search.setQuery("",false); search.clearFocus(); search.onActionViewCollapsed(); + search.clearFocus(); return true; } diff --git a/app/src/main/java/de/jkliemann/parkendd/Views/Main/MapFragment.java b/app/src/main/java/de/jkliemann/parkendd/Views/Main/MapFragment.java index c5fa03d..8f46bc6 100644 --- a/app/src/main/java/de/jkliemann/parkendd/Views/Main/MapFragment.java +++ b/app/src/main/java/de/jkliemann/parkendd/Views/Main/MapFragment.java @@ -7,6 +7,8 @@ import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; @@ -64,8 +66,9 @@ public void onCreate(Bundle savedInstanceState) { }else{ self = city.location(); } - + getActivity().setTitle(city.name()); + setHasOptionsMenu(true); } @@ -95,10 +98,19 @@ public void onDetach() { mListener = null; } + @Override + public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { + if(menu != null) + { + menu.clear(); + } + super.onCreateOptionsMenu(menu,inflater); + } + private void setUpMapView(View view) { final MapView map = (MapView) view.findViewById(R.id.osmap); map.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE); - map.setBuiltInZoomControls(true); + map.setBuiltInZoomControls(false); map.setMultiTouchControls(true); final IMapController mapctl = map.getController(); mapctl.setZoom(15); diff --git a/app/src/main/java/de/jkliemann/parkendd/Views/Main/RemoteParkingSlotListFragment.java b/app/src/main/java/de/jkliemann/parkendd/Views/Main/RemoteParkingSlotListFragment.java index ba0c80e..d53e81d 100644 --- a/app/src/main/java/de/jkliemann/parkendd/Views/Main/RemoteParkingSlotListFragment.java +++ b/app/src/main/java/de/jkliemann/parkendd/Views/Main/RemoteParkingSlotListFragment.java @@ -60,6 +60,8 @@ public class RemoteParkingSlotListFragment extends Fragment implements LoaderInt private OnFragmentInteractionListener mListener; + private int previousGroup = -1; + public RemoteParkingSlotListFragment() { // Required empty public constructor } @@ -206,7 +208,15 @@ private void refresh(){ } private void setList(City CITY){ - ExpandableListView spotView = (ExpandableListView)getView().findViewById(R.id.spotListView); + final ExpandableListView spotView = (ExpandableListView)getView().findViewById(R.id.spotListView); + spotView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() { + @Override + public void onGroupExpand(int groupPosition) { + if(groupPosition != previousGroup) + spotView.collapseGroup(previousGroup); + previousGroup = groupPosition; + } + }); String sortOptions[] = getResources().getStringArray(R.array.setting_sort_options); String sortPreference = PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("sorting", sortOptions[0]); Boolean hide_closed = PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("hide_closed", true); diff --git a/app/src/main/java/de/jkliemann/parkendd/Views/SlotListAdapter.java b/app/src/main/java/de/jkliemann/parkendd/Views/SlotListAdapter.java index f626dad..28b2cef 100644 --- a/app/src/main/java/de/jkliemann/parkendd/Views/SlotListAdapter.java +++ b/app/src/main/java/de/jkliemann/parkendd/Views/SlotListAdapter.java @@ -4,7 +4,6 @@ import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; -import android.graphics.Color; import android.location.Location; import android.net.Uri; import android.view.LayoutInflater; @@ -21,6 +20,7 @@ import de.jkliemann.parkendd.Model.ParkingSpot; import de.jkliemann.parkendd.ParkenDD; import de.jkliemann.parkendd.R; +import de.jkliemann.parkendd.Utilities.ColorUtilities; import de.jkliemann.parkendd.Utilities.Error; import de.jkliemann.parkendd.Utilities.Util; @@ -30,10 +30,6 @@ public class SlotListAdapter extends BaseExpandableListAdapter { private final Context context; private final ParkingSpot[] spots; private final Location currentLocation; - private final int red = Color.argb(0xaa, 0xef, 0x53, 0x50); - private final int green = Color.argb(0xaa, 0x66, 0xbb, 0x6a); - private final int yellow = Color.argb(0xaa, 0xff, 0xee, 0x58); - private final int blue = Color.argb(0xaa, 0x42, 0xa5, 0xf5); private static final String CLOSED = "closed"; private static final String NODATA = "nodata"; private static final Map typeMap; @@ -91,26 +87,44 @@ public View getGroupView(int position, boolean isExpanded, View view, ViewGroup LayoutInflater inflater = (LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE); View slotView = inflater.inflate(R.layout.slot_list_adapter, parent, false); TextView countView = (TextView)slotView.findViewById(R.id.countView); + TextView percentView = (TextView)slotView.findViewById(R.id.percentView); TextView nameView = (TextView)slotView.findViewById(R.id.nameView); TextView distanceView = (TextView)slotView.findViewById(R.id.distanceView); + TextView parkingTypeView = (TextView)slotView.findViewById(R.id.parkingTypeView); + ParkingSpot spot = spots[position]; + nameView.setText(spot.name()); + if(spot.state().equals(CLOSED)) { countView.setText(context.getString(R.string.closed)); - slotView.setBackgroundColor(red); - }else if(spot.state().equals(NODATA)){ + slotView.setBackgroundColor(context.getResources().getColor(R.color.parkingNoData)); + } + else if(spot.state().equals(NODATA)){ countView.setText(context.getString(R.string.nodata) + " (" + Integer.toString(spot.count()) + ")"); - slotView.setBackgroundColor(blue); - }else{ - countView.setText(Integer.toString(spot.free()) + " " + context.getString(R.string.of) + " " + Integer.toString(spot.count())); - double perc = (double)spot.free() / (double)spot.count(); - if(perc < 0.05){ - slotView.setBackgroundColor(red); - }else if(perc < 0.2){ - slotView.setBackgroundColor(yellow); - }else{ - slotView.setBackgroundColor(green); + slotView.setBackgroundColor(context.getResources().getColor(R.color.parkingNoData)); + } + else{ + // Count + countView.setText(Integer.toString(spot.free())); + + // Parking type + try { + parkingTypeView.setText(context.getString(typeMap.get(spot.type()))); + }catch (NullPointerException e) { + e.printStackTrace(); } + + + // Percentage of free places + float percentageFreePlaces = (float)spot.free() / (float)spot.count(); + int percentageFreePlacesFormatted = (int) (percentageFreePlaces * 100); + percentView.setText(context.getResources().getString(R.string.free,percentageFreePlacesFormatted)); + + // Background color + slotView.setBackgroundColor(ColorUtilities.mixBetweenColors(percentageFreePlaces, + context.getResources().getColor(R.color.parkingFull), + context.getResources().getColor(R.color.parkingFree))); } if(currentLocation != null && spot.location() != null){ distanceView.setText(Util.getViewDistance(Util.getDistance(currentLocation, spot.location()))); @@ -124,34 +138,43 @@ public View getGroupView(int position, boolean isExpanded, View view, ViewGroup public View getChildView(int groupId, int childId, boolean isLastChild, View view, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE); final View detailView = inflater.inflate(R.layout.list_detail, null); - final ParkingSpot child = spots[groupId]; - TextView type = (TextView)detailView.findViewById(R.id.type); - try{ - type.setText(context.getString(typeMap.get(child.type()))); - }catch (NullPointerException e){ - e.printStackTrace(); - type.setText(child.type()); - } + final ParkingSpot spot = spots[groupId]; + TextView address = (TextView)detailView.findViewById(R.id.address); - address.setText(child.address()); - TextView region = (TextView)detailView.findViewById(R.id.region); - region.setText(child.category()); + address.setText(spot.address()); + ImageButton mapButton = (ImageButton)detailView.findViewById(R.id.mapButton); + mapButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - Uri geouri = child.geoUri(); - try{ - Intent map = new Intent(Intent.ACTION_VIEW, geouri); - String city = ((ParkenDD) ((Activity)context).getApplication()).currentCity().name(); - ((ParkenDD) ((Activity) context).getApplication()).getTracker().trackEvent(city, child.name()); - context.startActivity(map); - }catch (ActivityNotFoundException e){ - e.printStackTrace(); - Error.showLongErrorToast(context, context.getString(R.string.intent_error)); + openMap(spot); + } + }); + + detailView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + openMap(spot); } - } }); + + // Background color + if(!spot.state().equals(CLOSED) && !spot.state().equals(NODATA)) + { + float percentageFreePlaces = (float)spot.free() / (float)spot.count(); + int parentColor = ColorUtilities.mixBetweenColors(percentageFreePlaces, + context.getResources().getColor(R.color.parkingFull), + context.getResources().getColor(R.color.parkingFree)); + + detailView.setBackgroundColor(ColorUtilities.darkenColor(parentColor, 5)); + } + else + { + detailView.setBackgroundColor(ColorUtilities.darkenColor(context.getResources().getColor(R.color.parkingNoData), 5)); + } + + return detailView; } @@ -164,4 +187,18 @@ public boolean isChildSelectable(int i, int i1) { public void onGroupExpanded(int position){ super.onGroupExpanded(position); } + + private void openMap(ParkingSpot spot) { + Uri geouri = spot.geoUri(); + try { + Intent map = new Intent(Intent.ACTION_VIEW, geouri); + String city = ((ParkenDD) ((Activity) context).getApplication()).currentCity().name(); + ((ParkenDD) ((Activity) context).getApplication()).getTracker().trackEvent(city, spot.name()); + context.startActivity(map); + } catch (ActivityNotFoundException e) { + e.printStackTrace(); + Error.showLongErrorToast(context, context.getString(R.string.intent_error)); + } + } + } \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/drawer_header.png b/app/src/main/res/drawable-hdpi/drawer_header.png new file mode 100644 index 0000000..c0a4472 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/drawer_header.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_app_icon.png b/app/src/main/res/drawable-hdpi/ic_app_icon.png deleted file mode 100644 index dfeba27..0000000 Binary files a/app/src/main/res/drawable-hdpi/ic_app_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_directions_black_48dp.png b/app/src/main/res/drawable-hdpi/ic_directions_black_48dp.png new file mode 100644 index 0000000..6ebfddb Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_directions_black_48dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_map_black_48dp.png b/app/src/main/res/drawable-hdpi/ic_map_black_48dp.png deleted file mode 100644 index 827c9fc..0000000 Binary files a/app/src/main/res/drawable-hdpi/ic_map_black_48dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-ldpi/drawer_header.png b/app/src/main/res/drawable-ldpi/drawer_header.png new file mode 100644 index 0000000..4e239b7 Binary files /dev/null and b/app/src/main/res/drawable-ldpi/drawer_header.png differ diff --git a/app/src/main/res/drawable-mdpi/drawer_header.png b/app/src/main/res/drawable-mdpi/drawer_header.png new file mode 100644 index 0000000..0c53864 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/drawer_header.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_app_icon.png b/app/src/main/res/drawable-mdpi/ic_app_icon.png deleted file mode 100644 index 547c7fc..0000000 Binary files a/app/src/main/res/drawable-mdpi/ic_app_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_directions_black_48dp.png b/app/src/main/res/drawable-mdpi/ic_directions_black_48dp.png new file mode 100644 index 0000000..56284b3 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_directions_black_48dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_map_black_48dp.png b/app/src/main/res/drawable-mdpi/ic_map_black_48dp.png deleted file mode 100644 index a3ecc71..0000000 Binary files a/app/src/main/res/drawable-mdpi/ic_map_black_48dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/drawer_header.png b/app/src/main/res/drawable-xhdpi/drawer_header.png new file mode 100644 index 0000000..63afd25 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/drawer_header.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_app_icon.png b/app/src/main/res/drawable-xhdpi/ic_app_icon.png deleted file mode 100644 index 887526d..0000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_app_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_directions_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_directions_black_48dp.png new file mode 100644 index 0000000..0ad2fbb Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_directions_black_48dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_map_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_map_black_48dp.png deleted file mode 100644 index da75c65..0000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_map_black_48dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/drawer_header.png b/app/src/main/res/drawable-xxhdpi/drawer_header.png new file mode 100644 index 0000000..b72b501 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/drawer_header.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_app_icon.png b/app/src/main/res/drawable-xxhdpi/ic_app_icon.png deleted file mode 100644 index 3ac5760..0000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_app_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_directions_black_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_directions_black_48dp.png new file mode 100644 index 0000000..26ef874 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_directions_black_48dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_map_black_48dp.png b/app/src/main/res/drawable-xxhdpi/ic_map_black_48dp.png deleted file mode 100644 index 75c0d4d..0000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_map_black_48dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/drawer_header.png b/app/src/main/res/drawable-xxxhdpi/drawer_header.png new file mode 100644 index 0000000..d041a90 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/drawer_header.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_directions_black_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_directions_black_48dp.png new file mode 100644 index 0000000..f02aee2 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_directions_black_48dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_map_black_48dp.png b/app/src/main/res/drawable-xxxhdpi/ic_map_black_48dp.png deleted file mode 100644 index 9de90c3..0000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_map_black_48dp.png and /dev/null differ diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index e898bdd..9cf9cc6 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -23,7 +23,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView" - android:background="@drawable/ic_app_icon"/> + android:background="@mipmap/ic_launcher"/> - + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginBottom="4dp" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:layout_marginTop="4dp" + android:foreground="?android:attr/selectableItemBackground" + card_view:cardCornerRadius="@dimen/cardview_default_radius" + card_view:cardElevation="@dimen/cardview_default_elevation"> - - - + android:orientation="vertical"> - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_forecast.xml b/app/src/main/res/layout/fragment_forecast.xml index 66ee7f0..6323712 100644 --- a/app/src/main/res/layout/fragment_forecast.xml +++ b/app/src/main/res/layout/fragment_forecast.xml @@ -1,68 +1,75 @@ - - - + android:id="@+id/listView" + android:layout_above="@+id/dateTimePicker" + android:groupIndicator="@null" - - - + android:divider="@null"/> - + android:minHeight="48dp" + + android:orientation="horizontal" + android:layout_alignParentBottom="true" + android:background="@android:color/white" + android:elevation="10dp"> + + + + - -