How to create single button Dialog in android?

前端 未结 2 2163
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 10:57

I have been searching for days trying to figure out how to add dialog with single button in my application. Thanks in advance!

2条回答
  •  孤城傲影
    2020-12-11 11:42

    Store the current version in your apps defaultsharedpreferences. Have a variable on your main activity which you increment when you increment the version in the manifest. During run, have it check the current with the version in the code and do something if the new one is higher. Then update the one in the preferences.

    EDIT:

    If they hit cancel on the dialog, have the program end so they are forced to see it every time they open it until they run the update.

提交回复
热议问题