I have implemented PagerSlidingTabStrip with success (it has a View Page). After this, I successfully put a drawer layout with a list view along with (yeh).
Again, I replace a framelayout with one piece with a list so that there is a piece in my drawer.
This is working but the orientation changes crash but I do not know why.
Here is the working XML.
& lt; Android.support.v4.widget.DrawerLayout xmlns: android = "http: // schemas android.com/apk/res/android" xmlns: tool = "http://schemas.android.com/tools" Android: ID = "@ + Id / drawer_layout" Android: layout_width = "fill_parent" Android: layout_height = "Fill_parent" android: background = "@ color / theme_color" & gt; & Lt ;! - Main content view - & gt; & Lt; RelativeLayout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: app = "http://schemas.android.com/apk/res-auto" xmlns: tools = "Http: //schemas.android.com/tools "android: layout_width =" match_parent "android: layout_height =" match_parent "android: background =" @color / blanccasse "& gt; & Lt; Com.astuetz.PagerSlidingTabStripAndroid: id = "@ + id / tab" Android: layout_width = "match_parent" Android: layout_height = "48dip" Android: background = "@ drawable / background_tabs" /> & Lt; Android: layout_below = "@ + id / tab" android: layout_margin = "Android" 5 DP "Tools: Reference =". Main Activity "/> & Lt; / RelativeLayout & gt; & Lt ;! - Navigation Drawer - & gt; & Lt; Android: layout_greenity = "start" android: choiceMode = "singleChoice" Android: Divider = "@ Android: Color / Android: layout_width =" 240dp "Android: layout_height =" match_parent "Android: layout_gravity =" Android: id = "@ + id / left_drawer" Transparent "Android: dividerHeight =" 0dp "Android: background =" # 111 "/> & Lt; /android.support.v4.widget.DrawerLayout>
If I replace the list view by
Android: layout_heid = "match_parent" Android: layout_gravity = "start" android: background = "@color / grid" & gt; & Lt; / FrameLayout & gt;
This orientation crashes on change.
Any ideas ?? Thank you. Edit
.xxx.MainActivity}: java.lang.ClassCastException: android.view.AbsSavedState $ 1 android.support.v4.widget.DrawerLayout $ SavedState
FrameLayout
You use the ListView
to change.
Comments
Post a Comment