jko
- Forum posts: 5
Mar 7, 2014, 4:58:28 AM via Website
Mar 7, 2014 4:58:28 AM via Website
I'm having problems trying to get a main layout with slide out menu or navigation drawer. I already using a Gesture overlay view and it seems that drawer layout is causing a inflation error. How can I implement a slide drawer with gesture overlay? Links are left out because forum will not allow.
1<android.support.v4.widget.DrawerLayout
2 xmlns:android=""
3 xmlns:tools=""
4 android:id="@+id/drawer_layout"
5 android:layout_width="match_parent"
6 android:layout_height="match_parent">
7
8
9 <android.gesture.GestureOverlayView
10 xmlns:android="
11 xmlns:tools=""
12 android:id="@+id/gestureOverlayView1"
13 android:layout_width="match_parent"
14
15 android:layout_height="match_parent"
16 tools:context=".MainActivity">
17
18
19
20 <LinearLayout
21 android:id="@+id/LinearLayout1"
22 android:layout_width="fill_parent"
23 android:layout_height="fill_parent"
24 android:orientation="vertical"
25 android:padding="10dp"
26 android:layout_gravity="start">
27
28
29
30 <TextView
31 android:id="@+id/timerTextView"
32 android:layout_width="wrap_content"
33 android:layout_height="wrap_content"
34 android:layout_gravity="right"
35 android:layout_marginRight="5sp"
36 android:text="@string/startTime"
37 android:textAppearance="?android:attr/textAppearanceSmall"
38 android:textSize="30sp" />
39
40 <TextView
41 android:id="@+id/hanziTextView"
42 android:layout_width="fill_parent"
43 android:layout_height="0dp"
44 android:layout_weight="1"
45 android:ems="10"
46 android:gravity="center"
47 android:textSize="50sp" />
48
49 <TextView
50 android:id="@+id/instructionTextView"
51 android:layout_width="574dp"
52 android:layout_height="wrap_content"
53 android:layout_weight="0.05"
54 android:textSize="40sp" />
55
56</LinearLayout>
57
58</android.gesture.GestureOverlayView>
59
60 <FrameLayout
61 android:id="@+id/content_frame"
62 android:layout_width="match_parent"
63 android:layout_height="match_parent" />
64 <!-- The navigation drawer -->
65 <ListView android:id="@+id/left_drawer"
66 android:layout_width="240dp"
67 android:layout_height="match_parent"
68 android:layout_gravity="start"
69 android:choiceMode="singleChoice"
70 android:divider="@android:color/transparent"
71 android:dividerHeight="0dp"
72 android:background="#111"/>
73
74
75
76
77
78</android.support.v4.widget.DrawerLayout>
2 xmlns:android=""
3 xmlns:tools=""
4 android:id="@+id/drawer_layout"
5 android:layout_width="match_parent"
6 android:layout_height="match_parent">
7
8
9 <android.gesture.GestureOverlayView
10 xmlns:android="
11 xmlns:tools=""
12 android:id="@+id/gestureOverlayView1"
13 android:layout_width="match_parent"
14
15 android:layout_height="match_parent"
16 tools:context=".MainActivity">
17
18
19
20 <LinearLayout
21 android:id="@+id/LinearLayout1"
22 android:layout_width="fill_parent"
23 android:layout_height="fill_parent"
24 android:orientation="vertical"
25 android:padding="10dp"
26 android:layout_gravity="start">
27
28
29
30 <TextView
31 android:id="@+id/timerTextView"
32 android:layout_width="wrap_content"
33 android:layout_height="wrap_content"
34 android:layout_gravity="right"
35 android:layout_marginRight="5sp"
36 android:text="@string/startTime"
37 android:textAppearance="?android:attr/textAppearanceSmall"
38 android:textSize="30sp" />
39
40 <TextView
41 android:id="@+id/hanziTextView"
42 android:layout_width="fill_parent"
43 android:layout_height="0dp"
44 android:layout_weight="1"
45 android:ems="10"
46 android:gravity="center"
47 android:textSize="50sp" />
48
49 <TextView
50 android:id="@+id/instructionTextView"
51 android:layout_width="574dp"
52 android:layout_height="wrap_content"
53 android:layout_weight="0.05"
54 android:textSize="40sp" />
55
56</LinearLayout>
57
58</android.gesture.GestureOverlayView>
59
60 <FrameLayout
61 android:id="@+id/content_frame"
62 android:layout_width="match_parent"
63 android:layout_height="match_parent" />
64 <!-- The navigation drawer -->
65 <ListView android:id="@+id/left_drawer"
66 android:layout_width="240dp"
67 android:layout_height="match_parent"
68 android:layout_gravity="start"
69 android:choiceMode="singleChoice"
70 android:divider="@android:color/transparent"
71 android:dividerHeight="0dp"
72 android:background="#111"/>
73
74
75
76
77
78</android.support.v4.widget.DrawerLayout>
— modified on Mar 7, 2014, 6:56:44 PM
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.