|
9 | 9 |
|
10 | 10 | <!--toggle1--> |
11 | 11 | <cn.intret.lab.library.LoadingToggleButton |
12 | | - android:id="@+id/toggle1" |
| 12 | + android:id="@+id/toggle_rect1" |
13 | 13 | android:layout_width="50dp" |
14 | 14 | android:layout_height="25dp" |
15 | 15 | android:layout_marginLeft="16dp" |
|
36 | 36 | android:gravity="center_vertical" |
37 | 37 | android:padding="5dp" |
38 | 38 | android:textColor="@android:color/holo_green_light" |
39 | | - app:layout_constraintBottom_toBottomOf="@+id/toggle1" |
40 | | - app:layout_constraintLeft_toRightOf="@+id/toggle1" |
41 | | - app:layout_constraintTop_toTopOf="@+id/toggle1" |
| 39 | + app:layout_constraintBottom_toBottomOf="@+id/toggle_rect1" |
| 40 | + app:layout_constraintLeft_toRightOf="@+id/toggle_rect1" |
| 41 | + app:layout_constraintTop_toTopOf="@+id/toggle_rect1" |
42 | 42 | tools:text="it's on"/> |
43 | 43 |
|
44 | 44 | <!--toggle2--> |
45 | 45 | <cn.intret.lab.library.LoadingToggleButton |
46 | | - android:id="@+id/toggle2" |
| 46 | + android:id="@+id/toggle_rect2" |
47 | 47 | android:layout_width="50dp" |
48 | 48 | android:layout_height="25dp" |
49 | 49 | android:layout_marginLeft="16dp" |
50 | 50 | android:layout_marginTop="16dp" |
51 | 51 | app:layout_constraintLeft_toLeftOf="parent" |
52 | | - app:layout_constraintTop_toBottomOf="@+id/toggle1" |
| 52 | + app:layout_constraintTop_toBottomOf="@+id/toggle_rect1" |
53 | 53 |
|
54 | 54 | app:ltbBackgroundCheckedColor="@color/colorAccent" |
55 | 55 | app:ltbBackgroundRadius="5dp" |
|
68 | 68 | android:layout_marginLeft="16dp" |
69 | 69 | android:layout_marginTop="16dp" |
70 | 70 | app:layout_constraintLeft_toLeftOf="parent" |
71 | | - app:layout_constraintTop_toBottomOf="@id/toggle2" |
| 71 | + app:layout_constraintTop_toBottomOf="@id/toggle_rect2" |
72 | 72 | app:ltbBackgroundCheckedColor="@android:color/holo_purple" |
73 | 73 | app:ltbBackgroundUncheckedColor="@android:color/darker_gray" |
74 | 74 | app:ltbChecked="false" |
|
106 | 106 | app:layout_constraintLeft_toRightOf="@+id/toggle_round2" |
107 | 107 | app:layout_constraintTop_toTopOf="@+id/toggle_round2"/> |
108 | 108 |
|
109 | | - <!--toggle 3--> |
| 109 | + <!--toggle flicking--> |
110 | 110 | <cn.intret.lab.library.LoadingToggleButton |
111 | | - android:id="@+id/toggle_round3" |
| 111 | + android:id="@+id/toggle_flicking" |
112 | 112 | android:layout_width="50dp" |
113 | 113 | android:layout_height="25dp" |
114 | 114 | android:layout_marginLeft="16dp" |
|
121 | 121 | app:ltbDuration="300" |
122 | 122 | app:ltbToggleCheckedColor="@android:color/white" |
123 | 123 | app:ltbToggleIndicatorFlickWhen="toggleToOn" |
124 | | - app:ltbToggleLoadingAnimationType="flick" |
125 | 124 | app:ltbToggleIndicatorHeight="2dp" |
126 | 125 | app:ltbToggleIndicatorVisibility="show" |
127 | 126 | app:ltbToggleIndicatorWidth="8dp" |
| 127 | + app:ltbToggleLoadingAnimationType="flick" |
128 | 128 | app:ltbToggleUncheckedColor="@android:color/white" |
129 | 129 | /> |
130 | 130 |
|
131 | 131 | <TextView |
| 132 | + android:id="@+id/tv_flicking_status" |
132 | 133 | android:layout_width="wrap_content" |
133 | 134 | android:layout_height="wrap_content" |
134 | 135 | android:layout_marginLeft="16dp" |
135 | 136 | android:text="Indicator Flicking" |
136 | | - app:layout_constraintLeft_toRightOf="@+id/toggle_round3" |
137 | | - app:layout_constraintTop_toTopOf="@+id/toggle_round3" |
| 137 | + android:textStyle="bold" |
| 138 | + app:layout_constraintBottom_toBottomOf="@id/toggle_flicking" |
| 139 | + app:layout_constraintLeft_toRightOf="@+id/toggle_flicking" |
| 140 | + app:layout_constraintTop_toTopOf="@+id/toggle_flicking" |
138 | 141 | /> |
139 | 142 |
|
140 | 143 | <!--Stop flicking--> |
141 | 144 | <TextView |
142 | 145 | android:id="@+id/btn_stop_flick" |
| 146 | + style="@style/TextButton" |
143 | 147 | android:layout_width="wrap_content" |
144 | 148 | android:layout_height="wrap_content" |
145 | | - android:layout_marginRight="16dp" |
146 | | - android:background="?attr/selectableItemBackground" |
147 | 149 | android:padding="5dp" |
148 | 150 | android:text="STOP FLICK" |
149 | | - android:textColor="@android:color/holo_green_light" |
150 | | - app:layout_constraintBottom_toBottomOf="@+id/toggle_round3" |
| 151 | + app:layout_constraintBottom_toBottomOf="@+id/toggle_flicking" |
151 | 152 | app:layout_constraintRight_toRightOf="parent" |
152 | | - app:layout_constraintTop_toTopOf="@+id/toggle_round3" |
153 | | - /> |
| 153 | + app:layout_constraintTop_toTopOf="@+id/toggle_flicking"/> |
154 | 154 |
|
| 155 | + <!--loading toggle - line spinner--> |
155 | 156 | <cn.intret.lab.library.LoadingToggleButton |
156 | 157 | android:id="@+id/toggle_line_spinner" |
157 | 158 | android:layout_width="50dp" |
158 | 159 | android:layout_height="25dp" |
159 | 160 | android:layout_marginLeft="16dp" |
160 | 161 | android:layout_marginTop="16dp" |
161 | 162 | app:layout_constraintLeft_toLeftOf="parent" |
162 | | - app:layout_constraintTop_toBottomOf="@id/toggle_round3" |
| 163 | + app:layout_constraintTop_toBottomOf="@id/toggle_flicking" |
163 | 164 | app:ltbBackgroundCheckedColor="@android:color/holo_purple" |
164 | 165 | app:ltbBackgroundUncheckedColor="@android:color/darker_gray" |
165 | | - app:ltbChecked="true" |
| 166 | + app:ltbChecked="false" |
166 | 167 | app:ltbDuration="300" |
167 | 168 | app:ltbToggleCheckedColor="@android:color/white" |
168 | 169 | app:ltbToggleIndicatorFlickWhen="toggleToOn" |
169 | | - app:ltbToggleLoadingAnimationType="lineSpinner" |
170 | 170 | app:ltbToggleIndicatorHeight="2dp" |
171 | 171 | app:ltbToggleIndicatorVisibility="show" |
172 | 172 | app:ltbToggleIndicatorWidth="8dp" |
| 173 | + app:ltbToggleLoadingAnimationType="lineSpinner" |
173 | 174 | app:ltbToggleUncheckedColor="@android:color/white" |
174 | 175 | /> |
175 | 176 |
|
| 177 | + <TextView |
| 178 | + android:id="@+id/tv_loading_status" |
| 179 | + android:layout_width="wrap_content" |
| 180 | + android:layout_height="wrap_content" |
| 181 | + android:layout_marginLeft="16dp" |
| 182 | + android:text="Indicator Loading Animation" |
| 183 | + android:textStyle="bold" |
| 184 | + app:layout_constraintBottom_toBottomOf="@id/toggle_line_spinner" |
| 185 | + app:layout_constraintLeft_toRightOf="@+id/toggle_line_spinner" |
| 186 | + app:layout_constraintTop_toTopOf="@+id/toggle_line_spinner" |
| 187 | + /> |
| 188 | + |
| 189 | + <TextView |
| 190 | + android:id="@+id/btn_stop_loading" |
| 191 | + style="@style/TextButton" |
| 192 | + android:layout_width="wrap_content" |
| 193 | + android:layout_height="wrap_content" |
| 194 | + android:text="STOP LOADING" |
| 195 | + app:layout_constraintBottom_toBottomOf="@+id/toggle_line_spinner" |
| 196 | + app:layout_constraintRight_toRightOf="parent" |
| 197 | + app:layout_constraintTop_toTopOf="@+id/toggle_line_spinner"/> |
| 198 | + |
176 | 199 | </android.support.constraint.ConstraintLayout> |
0 commit comments