旋转屏幕 - imageview android

时间:2015-02-05 11:06:04

标签: android android-layout rotation imageview screen

当我打开我的手机屏幕时,在onSaveInstanceState方法(Bundle bundle)上激活,我捕获屏幕数据并存储在onSaveInstanceState Bundle中。在屏幕结束时,在onRestoreInstanceState方法(Bundle bundle)上启用了旋转,我使用例如:bundle.getString(key)来捕获包数据。

但是,当我使用ImageView时,我会捕获图像,转换为位图然后转换为字符串,我存储并检索何时进行转换,它不会被制作并且是默认图像。

我怀疑应该存储图像字符串,所以从图库中选择它。你觉得怎么样?

其他一些教程说这不可行,应存储在SD中,然后在onCreate方法中恢复。

0 个答案:

没有答案