Use ScrollView to include the full layout.
1. Use ScrollView 2. Give ListView a fixed layout_height Demo: https://screencast.googleplex.com/cast/NDg1NTE0OTI0MDUxNjYwOHxjNGVjYTA4OC03OQ Bug: 276416718 Bug: 277153488 Test: manual Change-Id: Ib1404bb060bf2ca448fe636db07b93c16ce14673
This commit is contained in:
@@ -14,8 +14,14 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||||
|
android:id="@+id/modifier_key_fragment_scroll_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:id="@+id/modifier_key_fragment_container"
|
android:id="@+id/modifier_key_fragment_container"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -23,17 +29,18 @@
|
|||||||
|
|
||||||
<LinearLayout android:orientation="vertical"
|
<LinearLayout android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:divider="?android:dividerHorizontal"
|
android:divider="?android:dividerHorizontal"
|
||||||
android:showDividers="end" >
|
android:showDividers="end" >
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/modifier_key_picker_title"
|
android:id="@+id/modifier_key_picker_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dip"
|
android:layout_marginTop="24dp"
|
||||||
android:layout_marginBottom="8dip"
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:text="@string/modifier_keys_picker_title"/>
|
android:text="@string/modifier_keys_picker_title"/>
|
||||||
@@ -42,46 +49,46 @@
|
|||||||
android:id="@+id/modifier_key_picker_summary"
|
android:id="@+id/modifier_key_picker_summary"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dip"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="16dip"
|
android:layout_marginBottom="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="?android:attr/textColorSecondary"/>
|
android:textColor="?android:attr/textColorSecondary"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout android:orientation="vertical"
|
<LinearLayout android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:divider="?android:dividerHorizontal"
|
android:divider="?android:dividerHorizontal"
|
||||||
android:showDividers="end">
|
android:showDividers="end">
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/modifier_key_picker"
|
android:id="@+id/modifier_key_picker"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="352dp"
|
||||||
android:divider="@null"
|
android:divider="@null"
|
||||||
android:dividerHeight="8dp"
|
android:dividerHeight="8dp"
|
||||||
android:padding="16dip"
|
android:padding="16dp"
|
||||||
android:listSelector="@drawable/modifier_key_lisetview_background"
|
android:listSelector="@drawable/modifier_key_lisetview_background"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dip"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginEnd="8dip"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginTop="6dip"
|
android:layout_marginTop="6dp"
|
||||||
android:layout_marginBottom="6dip"
|
android:layout_marginBottom="6dp">
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/modifier_key_cancel_button"
|
android:id="@+id/modifier_key_cancel_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="6dip"
|
android:layout_marginTop="6dp"
|
||||||
android:layout_marginBottom="6dip"
|
android:layout_marginBottom="6dp"
|
||||||
android:layout_marginStart="8dip"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:paddingVertical="14dp"
|
android:paddingVertical="14dp"
|
||||||
android:drawablePadding="9dp"
|
android:drawablePadding="9dp"
|
||||||
@@ -93,9 +100,9 @@
|
|||||||
android:id="@+id/modifier_key_done_button"
|
android:id="@+id/modifier_key_done_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="6dip"
|
android:layout_marginTop="6dp"
|
||||||
android:layout_marginBottom="6dip"
|
android:layout_marginBottom="6dp"
|
||||||
android:layout_marginEnd="8dip"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:paddingVertical="14dp"
|
android:paddingVertical="14dp"
|
||||||
android:drawablePadding="9dp"
|
android:drawablePadding="9dp"
|
||||||
@@ -104,4 +111,5 @@
|
|||||||
android:text="@string/modifier_keys_done"/>
|
android:text="@string/modifier_keys_done"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
@@ -26,7 +26,6 @@
|
|||||||
android:layout_marginTop="24dip"
|
android:layout_marginTop="24dip"
|
||||||
android:layout_marginBottom="8dip"
|
android:layout_marginBottom="8dip"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:text="@string/modifier_keys_reset_title" />
|
android:text="@string/modifier_keys_reset_title" />
|
||||||
@@ -39,7 +38,6 @@
|
|||||||
android:layout_marginBottom="16dip"
|
android:layout_marginBottom="16dip"
|
||||||
android:layout_marginStart="32dip"
|
android:layout_marginStart="32dip"
|
||||||
android:layout_marginEnd="32dip"
|
android:layout_marginEnd="32dip"
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
Reference in New Issue
Block a user