diff --git a/app/src/main/java/it/danieleverducci/subitobeers/ui/BeersFragment.kt b/app/src/main/java/it/danieleverducci/subitobeers/ui/BeersFragment.kt index b3b1c60..cda5b09 100644 --- a/app/src/main/java/it/danieleverducci/subitobeers/ui/BeersFragment.kt +++ b/app/src/main/java/it/danieleverducci/subitobeers/ui/BeersFragment.kt @@ -122,7 +122,14 @@ class BeersFragment : Fragment(), BeersRepository.Listener, BeerRecyclerAdapter. } val year = if (type == FILTERTYPE.SINCE) repo.filter.brewedAfterYear else repo.filter.brewedBeforeYear val month = if (type == FILTERTYPE.SINCE) repo.filter.brewedAfterMonth else repo.filter.brewedBeforeMonth - val dpd = DatePickerDialog(requireContext(), listener, year, month - 1,1) + val dpd = DatePickerDialog(requireContext(), R.style.beer_date_picker_dialog, listener, year, month - 1,1) + // Try to hide unused day spinner + val daySpinnerId = Resources.getSystem().getIdentifier("day", "id", "android") + if (daySpinnerId != 0) { + val daySpinnerView = dpd.datePicker.findViewById(daySpinnerId) + if (daySpinnerView != null) + daySpinnerView.visibility = View.GONE + } dpd.show() } diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 315e29c..d5fcfe1 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -11,6 +11,16 @@ @color/black ?attr/colorPrimaryVariant - + + + + + \ No newline at end of file