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

旧城冷巷雨未停 提交于 2020-01-22 18:59:07

问题


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

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


回答1:


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



来源:https://stackoverflow.com/questions/11220820/the-method-showdialogint-from-the-type-activity-is-deprecated-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!