|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<LinearLayout |
| 2 | +<ScrollView |
3 | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | | - xmlns:app="http://schemas.android.com/apk/res-auto" |
6 | 5 | android:layout_width="match_parent" |
7 | 6 | android:layout_height="match_parent" |
8 | | - android:orientation="vertical" |
| 7 | + android:overScrollMode="never" |
9 | 8 | tools:context="moe.feng.scut.autowifi.MainActivity"> |
10 | 9 |
|
11 | | - <FrameLayout |
12 | | - android:id="@+id/app_bar_container" |
| 10 | + <LinearLayout |
13 | 11 | android:layout_width="match_parent" |
14 | | - android:layout_height="wrap_content"> |
| 12 | + android:layout_height="wrap_content" |
| 13 | + android:orientation="vertical"> |
15 | 14 |
|
16 | | - <LinearLayout |
17 | | - android:id="@+id/app_bar" |
| 15 | + <FrameLayout |
| 16 | + android:id="@+id/app_bar_container" |
18 | 17 | android:layout_width="match_parent" |
19 | | - android:layout_height="wrap_content" |
20 | | - android:orientation="vertical"> |
21 | | - |
22 | | - <ImageView |
23 | | - android:id="@+id/header_image" |
24 | | - android:layout_width="match_parent" |
25 | | - android:layout_height="240dp" |
26 | | - android:scaleType="centerCrop" |
27 | | - android:src="@drawable/header_background"/> |
| 18 | + android:layout_height="wrap_content"> |
28 | 19 |
|
29 | 20 | <LinearLayout |
| 21 | + android:id="@+id/app_bar" |
30 | 22 | android:layout_width="match_parent" |
31 | 23 | android:layout_height="wrap_content" |
32 | | - android:background="@color/teal_800" |
33 | | - android:paddingTop="16dp" |
34 | | - android:paddingBottom="16dp" |
35 | | - android:paddingStart="24dp" |
36 | | - android:paddingEnd="24dp"> |
| 24 | + android:orientation="vertical"> |
37 | 25 |
|
38 | | - <TextView |
39 | | - android:layout_width="wrap_content" |
| 26 | + <ImageView |
| 27 | + android:id="@+id/header_image" |
| 28 | + android:layout_width="match_parent" |
| 29 | + android:layout_height="240dp" |
| 30 | + android:scaleType="centerCrop" |
| 31 | + android:src="@drawable/header_background"/> |
| 32 | + |
| 33 | + <LinearLayout |
| 34 | + android:layout_width="match_parent" |
| 35 | + android:layout_height="wrap_content" |
| 36 | + android:background="@color/teal_800" |
| 37 | + android:paddingTop="16dp" |
| 38 | + android:paddingBottom="16dp" |
| 39 | + android:paddingStart="24dp" |
| 40 | + android:paddingEnd="24dp"> |
| 41 | + |
| 42 | + <TextView |
| 43 | + android:layout_width="wrap_content" |
| 44 | + android:layout_height="wrap_content" |
| 45 | + android:text="@string/app_name" |
| 46 | + android:textAppearance="@android:style/TextAppearance.Material.Display1" |
| 47 | + android:textColor="@android:color/primary_text_dark"/> |
| 48 | + |
| 49 | + </LinearLayout> |
| 50 | + |
| 51 | + <LinearLayout |
| 52 | + android:layout_width="match_parent" |
40 | 53 | android:layout_height="wrap_content" |
41 | | - android:text="@string/app_name" |
42 | | - android:textAppearance="@android:style/TextAppearance.Material.Display1" |
43 | | - android:textColor="@android:color/primary_text_dark"/> |
| 54 | + android:background="@color/teal_700" |
| 55 | + android:paddingTop="24dp" |
| 56 | + android:paddingBottom="24dp" |
| 57 | + android:paddingStart="24dp" |
| 58 | + android:paddingEnd="24dp"> |
| 59 | + |
| 60 | + <TextView |
| 61 | + android:id="@+id/status_text" |
| 62 | + android:layout_width="wrap_content" |
| 63 | + android:layout_height="wrap_content" |
| 64 | + android:drawableStart="@drawable/ic_perm_data_setting_white_24dp" |
| 65 | + android:drawablePadding="16dp" |
| 66 | + android:text="@string/status_text_format" |
| 67 | + android:textAppearance="@android:style/TextAppearance.Material.Medium" |
| 68 | + android:textColor="@android:color/primary_text_dark"/> |
| 69 | + |
| 70 | + </LinearLayout> |
44 | 71 |
|
45 | 72 | </LinearLayout> |
46 | 73 |
|
| 74 | + <moe.feng.scut.autowifi.view.FloatingActionButton |
| 75 | + android:id="@+id/fab" |
| 76 | + android:layout_width="wrap_content" |
| 77 | + android:layout_height="wrap_content" |
| 78 | + android:layout_marginTop="216dp" |
| 79 | + android:layout_marginEnd="16dp" |
| 80 | + android:layout_gravity="top|end" |
| 81 | + android:src="@drawable/ic_settings_input_component_black_24dp" |
| 82 | + android:tint="@android:color/white"/> |
| 83 | + |
| 84 | + </FrameLayout> |
| 85 | + |
| 86 | + <!-- This card is for test. Account should be set up in settings activity. --> |
| 87 | + <android.support.v7.widget.CardView |
| 88 | + android:id="@+id/account_card" |
| 89 | + android:layout_width="match_parent" |
| 90 | + android:layout_height="wrap_content" |
| 91 | + android:layout_marginTop="16dp" |
| 92 | + android:layout_marginStart="16dp" |
| 93 | + android:layout_marginEnd="16dp" |
| 94 | + android:layout_marginBottom="16dp" |
| 95 | + android:focusable="true" |
| 96 | + android:focusableInTouchMode="true"> |
| 97 | + |
47 | 98 | <LinearLayout |
48 | 99 | android:layout_width="match_parent" |
49 | 100 | android:layout_height="wrap_content" |
50 | | - android:background="@color/teal_700" |
51 | | - android:paddingTop="24dp" |
52 | | - android:paddingBottom="24dp" |
53 | | - android:paddingStart="24dp" |
54 | | - android:paddingEnd="24dp"> |
| 101 | + android:orientation="vertical" |
| 102 | + android:padding="16dp"> |
55 | 103 |
|
56 | | - <TextView |
| 104 | + <EditText |
| 105 | + android:id="@+id/user_name" |
| 106 | + android:layout_width="match_parent" |
| 107 | + android:layout_height="wrap_content" |
| 108 | + android:hint="User Name" |
| 109 | + android:inputType="number" |
| 110 | + android:typeface="monospace"/> |
| 111 | + |
| 112 | + <Space |
57 | 113 | android:layout_width="wrap_content" |
| 114 | + android:layout_height="16dp"/> |
| 115 | + |
| 116 | + <EditText |
| 117 | + android:id="@+id/user_pwd" |
| 118 | + android:layout_width="match_parent" |
58 | 119 | android:layout_height="wrap_content" |
59 | | - android:text="Status: Connected" |
60 | | - android:textAppearance="@android:style/TextAppearance.Material.Medium" |
61 | | - android:textColor="@android:color/primary_text_dark"/> |
| 120 | + android:hint="Password" |
| 121 | + android:inputType="textPassword" |
| 122 | + android:typeface="monospace"/> |
62 | 123 |
|
63 | 124 | </LinearLayout> |
64 | 125 |
|
65 | | - </LinearLayout> |
66 | | - |
67 | | - <moe.feng.scut.autowifi.view.FloatingActionButton |
68 | | - android:id="@+id/fab" |
69 | | - android:layout_width="wrap_content" |
70 | | - android:layout_height="wrap_content" |
71 | | - android:layout_marginTop="216dp" |
72 | | - android:layout_marginEnd="16dp" |
73 | | - android:layout_gravity="top|end" |
74 | | - android:src="@drawable/ic_settings_input_component_black_24dp" |
75 | | - android:tint="@android:color/white"/> |
| 126 | + </android.support.v7.widget.CardView> |
76 | 127 |
|
77 | | - </FrameLayout> |
| 128 | + </LinearLayout> |
78 | 129 |
|
79 | | -</LinearLayout> |
| 130 | +</ScrollView> |
0 commit comments