开发者

result is disappeared when mobile orientation is changed

in my application result displayed in Text view is disappeared when mobile orientation is changed,for this 开发者_如何学Cwhat can i do.i want my application in both modes means portrait and landscape.for this what can i do.Give me some suggestions.Thanks in advance


Hi Sairam something fast to avoid that

set in your app activity

      android:configChanges="keyboardHidden|orientation"            


That happens because activity is recreated when origientation changes, to avoid this you can use Jorgesys Answer, thats if your min Api level is < 13, if is older, you use screenSize too , by other side, if you want to handle it, you work with savedIntance Bundle.


This is a little dated but has some links in it that should still be very valuable for you.

See: Android - switching between landscape and portrait mode makes Intent lose values

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜