showDialog在API level 13的时候已经过时了,SDK文档中推荐使用DialogFragment类来代替
public final void showDialog (int id)
Added in API level 1This method was deprecated in API level 13.
Use the newDialogFragmentclass withFragmentManagerinstead; this is also available on older platforms through the Android compatibility package.Simple version of
showDialog(int, Bundle)that does not take any arguments. Simply callsshowDialog(int, Bundle)with null arguments.
文章详细介绍了在API13及以上版本中,DialogFragment是如何替代showDialog方法使用的,提供了简单版本的showDialog(int, Bundle)调用方式,并强调了通过Android兼容性包在较旧平台上可用这一特性。
2万+

被折叠的 条评论
为什么被折叠?



