当页面在 android 中加载其组件时更改移动设备的方向时出现错误?
我打开了一个页面,其中我从用户那里获取了信息...但是如果我更改移动设备的方向,文本视图中填写的所有信息都会消失...我如何将信息保存在文本视图中,无论有多少次用户改变方向...顺便说一句,我在所有活动中使用 android:theme="@android:style/Theme.Dialog"
...请有人提出一些建议...
谢谢
i have one page opened in which i have taken information from the user... but if i change the orientation of the mobile all the information filled in the textview disappears... how would i make information saved in the textview no matter how many times user changes orientation... by the away i am using android:theme="@android:style/Theme.Dialog"
in all activities... please some body suggest something...
Thanx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好尝试这种方式,我不确定在我的应用程序中这是否有效......
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
Toast.makeText(MainActivity.this, "调用保存实例", Toast.LENGTH_SHORT).show();
}
better try out this way iam not sure in my application this was working....
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
Toast.makeText(MainActivity.this, "Saveinstance invoked", Toast.LENGTH_SHORT).show();
}