I am stuck with my issue.Thing is that its a custom Tab Widget.In that have multiple
tab like Home
- News
- Abc
- PQR
.
The Activity should be for both orientation like portrait and landscape
. so for that each tab have two xml
for portrait which is store at layout-port/file.xml
and landscape which store at layout-land/file.xml
For manage orientation portrait to landscape i have added android:configChanges="orientation|keyboardHidden"
rule tag in each activity.
TAB_SAMPLE.java
Tab file.
TAB_GROUP_ACTIVITY
each Tab Group activity File
file.java
Task file
After all this stuff i get issue here :
If i add
android:configChanges="orientation|keyboardHidden"rule tag in tab_sample
activity then its working perfect. like manage different view. port to land and land to port but its not working in Home.java.
Now if i remove android:configChanges="orientation|keyboardHidden" rule tag in tab_sample
activity then its working for Home activity not for News.java
Mean when i change the orientation its keeping same xml form port not use from layout-land.in the sense its call OnCreate() again.
So as i found may be issue is in Tab Widget.
Update
Now after tracing my code i get that main issue is in grid view activity because its only activity which is not working.
Issue is between Tab host v/s Grid View
. I don't know why its not taking layout-land xml file. i found this as same issue but no replay on that question also
see in Detail manifestfile.xml
I want to maintain both portrait and landscape in all activity.
Both XML File
Please help me how to solve this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…