开发者

Null in text when orientation is changed...!

I have a slideshow item. who's image is enlargeable. when i click on image on the slide it gets enlarged and when i tap the screen text related to that image displays on screen. But when i change the orientation of the emulator or phone, the in the text portion "null" is displayed which is not required, and when i move through the slideshow items in the enlarged view, the related text goes fine,开发者_运维知识库 when again i change orientation the slideshow item that was opened with text on it, shows null and when i move through text appears fine and so on....!!!

what should i do...??? So that i can get the text related to that slideshow item as well which was opened before the orientation was changed.


freeze the UI on orientation change.

Add the following to the activity declaration in the manifest:

android:configChanges="orientation"

so it looks like

<activity android:label="@string/app_name" 
        android:configChanges="orientation|keyboardHidden" 
        android:name=".your.package">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜