android - All inflated items are vanished when screen orientation changes -
please me..
in activity use loop inflate items using layoutinflator service. there textviews in activity. textview values remain unchanged inflated items vanished when change screen orientation..
i know activity recreated again redraw ui match layouts , tried saving instance bundle. helpless. can save these inflated items bundle , restore on restore.
one guy told me hide soft keyboard when change orientation. set properties on manifest , hiding keyboard on orientation change event listener.
the way can protect app turn off auto orientation. thats not want.
in manifest, put android:configchanges = "orientation"
activity. prevent activity being destroyed , recreated when rotate screen.
note have careful when doing this. if of resources depend on orientation configuration (like if have resource folder called values-land or drawable-port, etc.) these resources must reloaded after configuration change. see documentation here.
Comments
Post a Comment