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
精彩评论