Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

enter image description here

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

like image 514
Sekar Avatar asked Jun 27 '12 06:06

Sekar


1 Answers

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

like image 140
Dheeresh Singh Avatar answered Nov 15 '22 20:11

Dheeresh Singh