|
15 | 15 | limitations under the License.
|
16 | 16 | -->
|
17 | 17 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
18 |
| - xmlns:autofit="http://schemas.android.com/apk/res-auto" |
19 |
| - android:splitMotionEvents="false" |
20 |
| - android:layout_width="match_parent" |
21 |
| - android:layout_height="wrap_content"> |
| 18 | + xmlns:autofit="http://schemas.android.com/apk/res-auto" |
| 19 | + android:splitMotionEvents="false" |
| 20 | + android:layout_width="match_parent" |
| 21 | + android:layout_height="wrap_content"> |
| 22 | + |
| 23 | + <!-- Layout in back to front render order --> |
22 | 24 | <View
|
23 | 25 | android:id="@+id/fading_background_back"
|
24 | 26 | android:alpha="0"
|
25 | 27 | android:layout_width="fill_parent"
|
26 | 28 | android:layout_height="fill_parent"
|
27 |
| - android:layout_alignTop="@+id/drawer_item_flow" |
| 29 | + android:layout_alignParentTop="true" |
28 | 30 | android:layout_alignBottom="@+id/drawer_item_flow"
|
29 | 31 | android:background="@color/app_drawer_drag_background" />
|
30 | 32 |
|
31 |
| - <!-- Layout in back to front render order --> |
| 33 | + <include |
| 34 | + android:id="@+id/custom_header_layout" |
| 35 | + layout="@layout/app_drawer_item_custom_header" /> |
| 36 | + |
32 | 37 | <LinearLayout
|
33 |
| - android:id="@+id/drawer_item_flow" |
34 |
| - android:layout_alignParentEnd="true" |
35 |
| - android:layout_toEndOf="@+id/drawer_item_title" |
36 |
| - android:layout_width="match_parent" |
37 |
| - android:layout_height="wrap_content" |
38 |
| - android:orientation="horizontal" /> |
| 38 | + android:id="@+id/drawer_item_flow" |
| 39 | + android:layout_alignParentEnd="true" |
| 40 | + android:layout_toEndOf="@+id/drawer_item_title" |
| 41 | + android:layout_width="match_parent" |
| 42 | + android:layout_height="wrap_content" |
| 43 | + android:layout_below="@id/custom_header_layout" |
| 44 | + android:orientation="horizontal" /> |
39 | 45 |
|
40 | 46 | <View
|
41 | 47 | android:id="@+id/fading_background_front"
|
42 | 48 | android:alpha="0"
|
43 | 49 | android:layout_width="fill_parent"
|
44 | 50 | android:layout_height="fill_parent"
|
45 |
| - android:layout_alignTop="@id/drawer_item_flow" |
| 51 | + android:layout_alignParentTop="true" |
46 | 52 | android:layout_alignBottom="@id/drawer_item_flow"
|
47 | 53 | android:background="@color/app_drawer_drag_background" />
|
48 | 54 |
|
49 | 55 | <com.android.launcher3.AutoFitTextView
|
50 |
| - android:id="@+id/drawer_item_title" |
51 |
| - android:layout_width="@dimen/app_drawer_char_width" |
52 |
| - android:layout_height="fill_parent" |
53 |
| - android:layout_marginTop="6dp" |
54 |
| - android:layout_marginBottom="24dp" |
55 |
| - android:layout_marginStart="6dp" |
56 |
| - android:layout_alignTop="@id/drawer_item_flow" |
| 56 | + android:id="@id/drawer_item_title" |
| 57 | + android:layout_width="@dimen/drawer_header_text_char_width" |
| 58 | + android:layout_height="wrap_content" |
| 59 | + android:layout_marginTop="@dimen/drawer_header_text_margin_top" |
| 60 | + android:layout_marginBottom="@dimen/drawer_header_text_margin_bottom" |
| 61 | + android:layout_marginStart="@dimen/drawer_header_text_margin_start" |
| 62 | + android:layout_alignTop="@id/custom_header_layout" |
| 63 | + android:layout_alignWithParentIfMissing="true" |
57 | 64 | android:layout_alignBottom="@id/drawer_item_flow"
|
58 |
| - android:layout_centerVertical="true" |
59 | 65 | android:includeFontPadding="false"
|
60 | 66 | android:gravity="center"
|
61 | 67 | android:singleLine="true"
|
62 |
| - autofit:minTextSize="8sp" |
63 |
| - android:textSize="24sp" |
64 |
| - android:layout_gravity="center" |
| 68 | + autofit:minTextSize="@dimen/drawer_header_text_min_text_size" |
| 69 | + android:textSize="@dimen/drawer_header_text_size" |
65 | 70 | android:fontFamily="sans-serif-light"
|
66 | 71 | android:textColor="@android:color/white"
|
67 |
| - android:shadowRadius="4.0" |
68 |
| - android:shadowDy="2" |
69 |
| - android:shadowColor="#b0000000"/> |
| 72 | + android:shadowRadius="@dimen/drawer_header_text_shadow_radius" |
| 73 | + android:shadowDy="@dimen/drawer_header_text_shadow_dy" |
| 74 | + android:shadowColor="@color/drawer_header_text_shadow"/> |
70 | 75 |
|
71 | 76 | </RelativeLayout>
|
0 commit comments