0

I'm having trouble with this code line to show a date range picker with android compose:

dateRangePicker.show(, "date_range_picker")

getting this:

None of the following functions can be called with the arguments supplied. show(FragmentManager, String?) defined in com.google.android.material.datepicker.MaterialDatePicker show(FragmentTransaction, String?) defined in com.google.android.material.datepicker.MaterialDatePicker

Any one had an idea what is happening?

  • 1
    Check https://stackoverflow.com/questions/67364372/appcompatactivity-instead-of-componentactivity-in-jetpack-compose – Gabriele Mariotti Aug 21 '21 at 06:18
  • 2
    Looks like you're missing first argument which should be context. How to get context you can see in Gabriele's mentioned question, also you need to update your activity to `AppCompatActivity`, as Gabriele said in his answer – Phil Dukhov Aug 21 '21 at 06:35

0 Answers0