android:configChanges 如何配置监视STK弹框

gemmo 2014-02-21 05:13:30
我在写一个apk时,重启后就自动运行,但是在重启后刚好会弹出联通或者移动SIM卡注册上的卡信息,导致onCreate会调用两次。使用其他不弹框的SIM卡不会出现这种情况。我在网上找了资料了解到
If the configuration of the device (as defined by the Resources.Configuration class) changes, then anything displaying a user interface will need to update to match that configuration.

http://www.cnblogs.com/hibraincol/archive/2010/09/18/1829862.html
网上一般都是通过修改android:configChanges来解决横竖屏或者键盘导致重新调用onCreate的方法,不知道如何解决这种弹框导致的重新调用。各位大大帮忙了。
...全文
129 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
gemmo 2014-02-21
  • 打赏
  • 举报
回复
引用 1 楼 juen32 的回复:
那你就在onstart 操作呗
onStart也会调用两次。 我可以通过其他方式解决这个问题,但是一来比较麻烦,而来想搞明白这个问题。
juen32 2014-02-21
  • 打赏
  • 举报
回复
那你就在onstart 操作呗

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧