showDialog deprecated. What's the alternative?

前端 未结 5 1828
猫巷女王i
猫巷女王i 2020-12-12 15:17

Is there something else that should be called?

showDialog(TIME_DIALOG_ID);

It\'s in this tutorial but says deprecated in Eclipse.<

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 15:54

    From Activity#showDialog(int):

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

提交回复
热议问题