summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJin Cao <jinyan@google.com>2014-07-29 17:56:44 -0700
committerJin Cao <jinyan@google.com>2014-07-29 17:59:10 -0700
commit6fc1fee597ebe3c30ebe5efebb4d6ea105641e0f (patch)
treeac925fe0b2cbe20e8214fd89f1b680b446520854 /res
parent58d541de27090b4bd55746368b3b3b1486a7c094 (diff)
downloadandroid_frameworks_opt_chips-6fc1fee597ebe3c30ebe5efebb4d6ea105641e0f.tar.gz
android_frameworks_opt_chips-6fc1fee597ebe3c30ebe5efebb4d6ea105641e0f.tar.bz2
android_frameworks_opt_chips-6fc1fee597ebe3c30ebe5efebb4d6ea105641e0f.zip
[Quantum] update alt/single chips to quantum
Updated UI for alternates/single chips dropdown. Not included: X button next to selected chip for removal. b/15934812 Change-Id: Id34e28f1783f85ffbe33f82b1d230c3def27589a
Diffstat (limited to 'res')
-rw-r--r--res/color/chips_dropdown_subtitle_text.xml (renamed from res/color/chips_dropdown_text.xml)2
-rw-r--r--res/color/chips_dropdown_title_text.xml23
-rw-r--r--res/layout/chips_autocomplete_recipient_dropdown_item.xml2
-rw-r--r--res/layout/chips_recipient_dropdown_item.xml5
-rw-r--r--res/values/dimen.xml2
-rw-r--r--res/values/styles.xml24
6 files changed, 42 insertions, 16 deletions
diff --git a/res/color/chips_dropdown_text.xml b/res/color/chips_dropdown_subtitle_text.xml
index f6addfd..e7b0f3e 100644
--- a/res/color/chips_dropdown_text.xml
+++ b/res/color/chips_dropdown_subtitle_text.xml
@@ -17,7 +17,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_activated="true" android:color="#212121"/>
+ <item android:state_activated="true" android:color="@android:color/white"/>
<item android:color="#757575"/>
</selector> \ No newline at end of file
diff --git a/res/color/chips_dropdown_title_text.xml b/res/color/chips_dropdown_title_text.xml
new file mode 100644
index 0000000..7c79390
--- /dev/null
+++ b/res/color/chips_dropdown_title_text.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_activated="true" android:color="@android:color/white"/>
+ <item android:color="#212121"/>
+
+</selector> \ No newline at end of file
diff --git a/res/layout/chips_autocomplete_recipient_dropdown_item.xml b/res/layout/chips_autocomplete_recipient_dropdown_item.xml
index 3f35e86..4f8427d 100644
--- a/res/layout/chips_autocomplete_recipient_dropdown_item.xml
+++ b/res/layout/chips_autocomplete_recipient_dropdown_item.xml
@@ -16,7 +16,7 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="@dimen/chip_dropdown_height"
android:background="@drawable/chips_dropdown_background"
style="@style/ChipAutocompleteWrapperStyle">
diff --git a/res/layout/chips_recipient_dropdown_item.xml b/res/layout/chips_recipient_dropdown_item.xml
index 343bf61..ec0740b 100644
--- a/res/layout/chips_recipient_dropdown_item.xml
+++ b/res/layout/chips_recipient_dropdown_item.xml
@@ -16,8 +16,9 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/chips_dropdown_background">
+ android:layout_height="@dimen/chip_dropdown_height"
+ android:background="@drawable/chips_dropdown_background"
+ android:padding="16dp">
<com.android.ex.chips.CircularImageView style="@style/ChipStartIconStyle" />
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index 636fd26..8c0d2c2 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -28,6 +28,8 @@
<!-- dropdown -->
<dimen name="chip_icon_margin_end">16dp</dimen>
+ <dimen name="chip_dropdown_height">72dp</dimen>
+ <!-- autocomplete dropdown -->
<dimen name="chip_wrapper_start_padding">16dp</dimen>
<dimen name="chip_wrapper_top_padding">16dp</dimen>
<dimen name="chip_wrapper_end_padding">16dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a2b8585..8b671d1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -16,20 +16,20 @@
<resources xmlns:tools="http://schemas.android.com/tools"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<style name="RecipientEditTextView" parent="@android:attr/autoCompleteTextViewStyle">
- <item name="android:inputType">textEmailAddress|textMultiLine</item>
- <item name="android:imeOptions">actionNext|flagNoFullscreen</item>
- <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
- <item name="android:background">@null</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
- <item name="android:dropDownVerticalOffset">-6dip</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:background">@null</item>
<item name="android:dropDownHorizontalOffset">-16dip</item>
+ <item name="android:dropDownVerticalOffset">-6dip</item>
<item name="android:dropDownWidth">match_parent</item>
- <item name="android:minHeight">48dip</item>
+ <item name="android:imeOptions">actionNext|flagNoFullscreen</item>
+ <item name="android:inputType">textEmailAddress|textMultiLine</item>
<item name="android:lineSpacingExtra">@dimen/line_spacing_extra</item>
+ <item name="android:minHeight">@dimen/chip_height</item>
+ <item name="android:popupBackground">@drawable/chips_popup_background</item>
<item name="android:textAlignment" tools:ignore="NewApi">viewStart</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textDirection" tools:ignore="NewApi">locale</item>
- <item name="android:popupBackground">@drawable/chips_popup_background</item>
</style>
<style name="ChipAutocompleteWrapperStyle">
@@ -43,12 +43,12 @@
<item name="android:id">@android:id/title</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_gravity">center_vertical</item>
<item name="android:ellipsize">middle</item>
<item name="android:paddingTop">1dp</item>
<item name="android:singleLine">true</item>
- <item name="android:textColor">@color/chips_dropdown_text</item>
- <item name="android:textSize">14sp</item>
- <item name="android:textStyle">bold</item>
+ <item name="android:textColor">@color/chips_dropdown_title_text</item>
+ <item name="android:textSize">16sp</item>
</style>
<style name="ChipTitleStartIconStyle" parent="@style/ChipTitleBaseStyle">
@@ -67,7 +67,7 @@
<item name="android:ellipsize">middle</item>
<item name="android:paddingBottom">1dp</item>
<item name="android:singleLine">true</item>
- <item name="android:textColor">@color/chips_dropdown_text</item>
+ <item name="android:textColor">@color/chips_dropdown_subtitle_text</item>
<item name="android:textSize">14sp</item>
</style>