Fix QS Detail header touch target

Move around some spacings and paddings to make sure the whole area
counts as a touch for the header.

Test: manual
Change-Id: I3d7515767cc3624efb195481886dc03c69cc39c9
Fixes: 38250837
This commit is contained in:
Jason Monk
2017-05-26 13:19:38 -04:00
parent 8d902a9e28
commit ecfbddbced
5 changed files with 35 additions and 30 deletions

View File

@@ -26,10 +26,6 @@
android:paddingBottom="8dp"
android:visibility="invisible">
<com.android.systemui.ResizingSpace
android:layout_width="match_parent"
android:layout_height="@dimen/qs_detail_margin_top" />
<include
android:id="@+id/qs_detail_header"
layout="@layout/qs_detail_header"

View File

@@ -20,34 +20,46 @@
android:layout_height="wrap_content"
android:paddingLeft="@dimen/qs_detail_header_padding"
android:paddingTop="@dimen/qs_detail_header_padding"
android:paddingBottom="@dimen/qs_detail_header_bottom_padding"
android:paddingBottom="@dimen/qs_detail_items_padding_top"
android:paddingEnd="@dimen/qs_panel_padding"
android:background="@drawable/btn_borderless_rect"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@android:id/title"
android:paddingStart="@dimen/qs_detail_header_text_padding"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textDirection="locale"
android:textAppearance="@style/TextAppearance.QS.DetailHeader" />
<com.android.systemui.ResizingSpace
android:layout_width="match_parent"
android:layout_height="@dimen/qs_detail_margin_top" />
<ImageView
android:id="@+id/settings"
android:layout_width="@dimen/qs_detail_image_width"
android:layout_height="@dimen/qs_detail_image_height"
android:background="?android:attr/selectableItemBackground"
android:padding="@dimen/qs_detail_image_padding"
android:src="@drawable/ic_settings"
android:visibility="gone"/>
<Switch
android:id="@android:id/toggle"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:textAppearance="@style/TextAppearance.QS.DetailHeader" />
android:orientation="horizontal">
<TextView
android:id="@android:id/title"
android:paddingStart="@dimen/qs_detail_header_text_padding"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textDirection="locale"
android:textAppearance="@style/TextAppearance.QS.DetailHeader" />
<ImageView
android:id="@+id/settings"
android:layout_width="@dimen/qs_detail_image_width"
android:layout_height="@dimen/qs_detail_image_height"
android:background="?android:attr/selectableItemBackground"
android:padding="@dimen/qs_detail_image_padding"
android:src="@drawable/ic_settings"
android:visibility="gone"/>
<Switch
android:id="@android:id/toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:textAppearance="@style/TextAppearance.QS.DetailHeader" />
</LinearLayout>
</com.android.keyguard.AlphaOptimizedLinearLayout>

View File

@@ -20,7 +20,6 @@
xmlns:sysui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/qs_detail_items_padding_top"
android:paddingStart="@dimen/qs_detail_padding_start"
android:paddingEnd="16dp">

View File

@@ -36,7 +36,6 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp" />
<RelativeLayout

View File

@@ -249,7 +249,6 @@
<dimen name="qs_panel_padding_bottom">0dp</dimen>
<dimen name="qs_detail_header_height">56dp</dimen>
<dimen name="qs_detail_header_padding">0dp</dimen>
<dimen name="qs_detail_header_bottom_padding">0dp</dimen>
<dimen name="qs_detail_image_width">56dp</dimen>
<dimen name="qs_detail_image_height">56dp</dimen>
<dimen name="qs_detail_image_padding">16dp</dimen>