Wrap bluetooth edit content in a scrollview.

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
This commit is contained in:
Fan Zhang
2016-07-06 16:40:34 -07:00
parent 071f62954d
commit 8924756a2b

View File

@@ -14,48 +14,56 @@
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">
<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" />
android:paddingEnd="25dp">
<LinearLayout
android:id="@+id/profiles_section"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<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>
</ScrollView>