0

I'm trying to build an app that lets the user pick a certain country from a dialog box. Since I'm super new to Android App Developing, I'm using this tutorial in order to complete this task. This tutorial makes use of this library on Github. However, the tutorial is outdated and uses a lot of android.support.v4 stuff which I think is now replaced (or something like that) by androidx.

While most of the stuff works, I am getting this error when I use the showDialog() method [when the "Show Countries" button is clicked:

enter image description here

The above error is happening when I use version 1.2.4 of the Github library. However, when I switch to the latest version of the library (v2.0.0), the same showDialog() method now takes an Activity as its parameter, which I'm not quite sure how to use.

So, in short, my question is: Is there a way to convert from androidx.fragment.app.FragmentManager to android.support.v4.app.FragmentManager or is there another fix to my issue? I can send my code if needed.

Any help would be amazing, thank you in advance!

TheSj
  • 376
  • 1
  • 11

0 Answers0