Commit a8897ca7 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW: increase the clickable area of the Spinner

This increases the clickable area of the Spinner, so the user can click
the word "Default" (or any of the blank space to the right of it),
instead of being restricted to clicking the arrow.

The issue was the TextView was intercepting touch events. Marking this
as non-clickable means the framework will pass touch events to the
Spinner (which sits just beneath it), which responds by bringing up the
menu of flag states.

This also marks the TextView as singleLine, to follow
simple_spinner_item.xml. This should be helpful if we ever display
longer text, since we don't ever want the Spinner to take up multiple
lines.

Bug: 1052356
Test: Manual - click "Default" and observe the menu pops up
Change-Id: I0a0f090d2c525ac26ded7c1a5a3e35b5e5ac9eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063812
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarHazem Ashmawy <hazems@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742725}
parent d723524f
...@@ -5,12 +5,15 @@ ...@@ -5,12 +5,15 @@
LICENSE file. LICENSE file.
--> -->
<!-- Make this non-clickable, so it passes touch events to the <Spinner>
sitting behind it. -->
<TextView <TextView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flag_states" android:id="@+id/flag_states"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textIsSelectable="true" android:singleLine="true"
android:clickable="false"
android:textStyle="bold" android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:padding="2dp" /> android:padding="2dp" />
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment