Reputation: 10472
In this question Dialog.show() vs. Activity.showDialog() it was recommended to use showDialog() that was 2010. I need to support Android 2.1-4.1 so should I keep this deprecated code or change it? Reason for deprecation?
Upvotes: 1
Views: 7020
Reputation: 4157
Android UI is now based on fragments, so you should use a DialogFragment.
It's included in the support library v4, so you can use it also in Android v2.1.
Blog post with example:
http://android-developers.blogspot.co.il/2012/05/using-dialogfragments.html
Documentation:
http://developer.android.com/reference/android/support/v4/app/DialogFragment.html
Upvotes: 5