OSDN Git Service

Layout change in support card and support dialog
authorjackqdyulei <jackqdyulei@google.com>
Tue, 11 Oct 2016 16:59:33 +0000 (09:59 -0700)
committerjackqdyulei <jackqdyulei@google.com>
Mon, 17 Oct 2016 22:12:37 +0000 (15:12 -0700)
1. Wrap the support_disclaimer_content by scrollview.
2. Change the layout in support_escalation_options using layout_weight.
3. Add styles in layout-sw300dp and layout-sw400dp

The target scope is between 300dp->400dp, so I add the default style
in sw400dp and changed style in sw300dp to cover it.

Bug: 31399419
Test: Visual
Change-Id: I117acb0c5b992bea2cded6cd48749c4ed7b04488

res/layout/support_disclaimer_content.xml
res/layout/support_escalation_options.xml
res/values-sw400dp/dimens.xml
res/values/dimens.xml
res/values/styles.xml

index d6697c3..196bef2 100644 (file)
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<LinearLayout
+<ScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:padding="24dp">
-
-    <com.android.settings.widget.LinkTextView
-        android:id="@+id/support_disclaimer_text"
+    android:layout_height="wrap_content">
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingBottom="24dp"/>
+        android:orientation="vertical"
+        android:padding="24dp">
 
-    <CheckBox
-        android:id="@+id/support_disclaimer_do_not_show_again"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/support_disclaimer_do_not_show"
-        android:textColor="?android:attr/textColorSecondary"/>
+        <com.android.settings.widget.LinkTextView
+            android:id="@+id/support_disclaimer_text"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingBottom="24dp"/>
 
-</LinearLayout>
+        <CheckBox
+            android:id="@+id/support_disclaimer_do_not_show_again"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/support_disclaimer_do_not_show"
+            android:textColor="?android:attr/textColorSecondary"/>
+    </LinearLayout>
+</ScrollView>
index b214561..63cc85d 100644 (file)
@@ -42,7 +42,8 @@
         android:gravity="center_horizontal"
         android:orientation="horizontal">
         <LinearLayout
-            android:layout_width="wrap_content"
+            android:layout_width="0dp"
+            android:layout_weight="1"
             android:layout_height="wrap_content"
             android:layout_marginStart="8dp"
             android:layout_marginEnd="8dp"
@@ -63,7 +64,8 @@
                 android:textColor="?android:attr/textColorSecondary"/>
         </LinearLayout>
         <LinearLayout
-            android:layout_width="wrap_content"
+            android:layout_width="0dp"
+            android:layout_weight="1"
             android:layout_height="wrap_content"
             android:layout_marginStart="8dp"
             android:layout_marginEnd="8dp"
index 9c82d90..da58a9c 100755 (executable)
@@ -25,4 +25,7 @@
 
     <dimen name="setup_fingerprint_ring_radius">92dp</dimen>
     <dimen name="setup_fingerprint_progress_bar_size">192dp</dimen>
+
+    <dimen name="support_escalation_card_padding_start">56dp</dimen>
+    <dimen name="support_escalation_card_padding_end">56dp</dimen>
 </resources>
index ba15a19..b266f9c 100755 (executable)
     <!-- Visible vertical space we want to show below password edittext field when ime is shown.
          The unit is sp as it is related to the text size of password requirement item. -->
     <dimen name="visible_vertical_space_below_password">20sp</dimen>
+
+    <!-- Padding for the escalation card in normal dimens -->
+    <dimen name="support_escalation_card_padding_start">40dp</dimen>
+    <dimen name="support_escalation_card_padding_end">40dp</dimen>
 </resources>
index 32c0b4d..fc37bb0 100644 (file)
         <item name="android:background">@color/card_background_grey</item>
         <item name="android:gravity">center</item>
         <item name="android:minHeight">368dp</item>
-        <item name="android:paddingStart">56dp</item>
-        <item name="android:paddingEnd">56dp</item>
+        <item name="android:paddingStart">@dimen/support_escalation_card_padding_start</item>
+        <item name="android:paddingEnd">@dimen/support_escalation_card_padding_end</item>
     </style>
 
     <style name="FingerprintHeaderStyle" parent="android:style/TextAppearance.Material.Subhead">