OSDN Git Service

Wrap bluetooth edit content in a scrollview.
authorFan Zhang <zhfan@google.com>
Wed, 6 Jul 2016 23:40:34 +0000 (16:40 -0700)
committerFan Zhang <zhfan@google.com>
Thu, 7 Jul 2016 01:18:50 +0000 (18:18 -0700)
Bug: 28914094

In split screen the dialog content is too tall to fit in viewport. Wrap
content in a scrollview so user can scroll vertically for different
options, and have a visual indication that content is scrollable.

Change-Id: Ia304dca6747cec6f31e86ccf89003ef6890e0640

res/layout/device_profiles_settings.xml

index bd78bea..260fa05 100644 (file)
      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:paddingStart="25dp"
-    android:orientation="vertical">
+    android:paddingEnd="25dp">
 
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/bluetooth_preference_paired_dialog_name_label"
-        android:textAppearance="@android:style/TextAppearance.Material.Body1"
-        android:textColor="?android:attr/textColorSecondary"
-        android:textDirection="locale"
-        android:paddingTop="16dp"
-        style="@style/bt_item_label" />
-
-    <EditText
-        android:id="@+id/name"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:inputType="textNoSuggestions"
-        android:maxLength="@integer/bluetooth_name_length"
-        android:singleLine="true"
-        android:paddingBottom="@dimen/bluetooth_dialog_padding"
-        android:textDirection="locale"
-        style="@style/bt_item_edit_content" />
-
-    <TextView
-        android:id="@+id/profiles_label"
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingTop="16dp"
-        android:paddingBottom="4dp"
-        android:text="@string/bluetooth_device_advanced_profile_header_title"
-        android:textAppearance="@android:style/TextAppearance.Material.Body1"
-        android:textColor="?android:attr/textColorSecondary" />
+        android:orientation="vertical">
 
-    <LinearLayout
-        android:id="@+id/profiles_section"
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content" />
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/bluetooth_preference_paired_dialog_name_label"
+            android:textAppearance="@android:style/TextAppearance.Material.Body1"
+            android:textColor="?android:attr/textColorSecondary"
+            android:textDirection="locale"
+            android:paddingTop="16dp"
+            style="@style/bt_item_label"/>
+
+        <EditText
+            android:id="@+id/name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textNoSuggestions"
+            android:maxLength="@integer/bluetooth_name_length"
+            android:singleLine="true"
+            android:paddingBottom="@dimen/bluetooth_dialog_padding"
+            android:textDirection="locale"
+            style="@style/bt_item_edit_content"/>
+
+        <TextView
+            android:id="@+id/profiles_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingTop="16dp"
+            android:paddingBottom="4dp"
+            android:text="@string/bluetooth_device_advanced_profile_header_title"
+            android:textAppearance="@android:style/TextAppearance.Material.Body1"
+            android:textColor="?android:attr/textColorSecondary"/>
+
+
+        <LinearLayout
+            android:id="@+id/profiles_section"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"/>
+
+    </LinearLayout>
 
-</LinearLayout>
+</ScrollView>