The method showDialog(int) from the type Activity is deprecated in android?

Sekar picture Sekar · Jun 27, 2012 · Viewed 27.2k times · Source

The method showDialog(int) from the type Activity is deprecated.

enter image description here

What's the reason? and how to solve it?

Answer

Dheeresh Singh picture Dheeresh Singh · Jun 27, 2012

What's the reason?

http://developer.android.com/reference/android/app/Activity.html#showDialog(int)

Android DialogFragment vs Dialog

How to solve it?

Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package.

http://android-developers.blogspot.in/2012/05/using-dialogfragments.html