summaryrefslogtreecommitdiffstats
path: root/chips/res
diff options
context:
space:
mode:
authorMindy Pereira <mindyp@google.com>2011-07-13 15:06:38 -0700
committerMindy Pereira <mindyp@google.com>2011-07-13 16:22:34 -0700
commitd8843738d9843ef67fba69ced485266b508fe0ac (patch)
tree54b52fee8d46d5932432d0bc5ab216eb4e730d9b /chips/res
parent29292772467cf521599dcd487de6b1807dec3e02 (diff)
downloadandroid_frameworks_ex-d8843738d9843ef67fba69ced485266b508fe0ac.tar.gz
android_frameworks_ex-d8843738d9843ef67fba69ced485266b508fe0ac.tar.bz2
android_frameworks_ex-d8843738d9843ef67fba69ced485266b508fe0ac.zip
Update suggestions dropdown to match pixel perfect layouts.
Change-Id: I0ced5414470d9a452da7296d217228802bb60ca1
Diffstat (limited to 'chips/res')
-rw-r--r--chips/res/drawable-hdpi/check_selected.9.pngbin1782 -> 0 bytes
-rw-r--r--chips/res/drawable-mdpi/check_selected.9.pngbin1782 -> 0 bytes
-rw-r--r--chips/res/drawable/bg_separator_inset.xml2
-rw-r--r--chips/res/drawable/chip_background_selected.xml2
-rw-r--r--chips/res/drawable/list_item_background.xml6
-rw-r--r--chips/res/drawable/list_item_font_primary.xml22
-rw-r--r--chips/res/drawable/list_item_font_secondary.xml22
-rw-r--r--chips/res/layout/chips_alternate_item.xml51
-rw-r--r--chips/res/layout/chips_recipient_dropdown_item.xml41
-rw-r--r--chips/res/layout/chips_separator.xml4
-rw-r--r--chips/res/layout/chips_separator_within_group.xml4
-rw-r--r--chips/res/values/attrs.xml2
-rw-r--r--chips/res/values/colors.xml2
13 files changed, 80 insertions, 78 deletions
diff --git a/chips/res/drawable-hdpi/check_selected.9.png b/chips/res/drawable-hdpi/check_selected.9.png
deleted file mode 100644
index 60b70aa..0000000
--- a/chips/res/drawable-hdpi/check_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/chips/res/drawable-mdpi/check_selected.9.png b/chips/res/drawable-mdpi/check_selected.9.png
deleted file mode 100644
index 60b70aa..0000000
--- a/chips/res/drawable-mdpi/check_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/chips/res/drawable/bg_separator_inset.xml b/chips/res/drawable/bg_separator_inset.xml
index e263b81..12b4cba 100644
--- a/chips/res/drawable/bg_separator_inset.xml
+++ b/chips/res/drawable/bg_separator_inset.xml
@@ -15,5 +15,5 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/bg_separator"
+ android:color="#20000000"
android:insetLeft="50dip"/>
diff --git a/chips/res/drawable/chip_background_selected.xml b/chips/res/drawable/chip_background_selected.xml
index 63e2bc9..87927f5 100644
--- a/chips/res/drawable/chip_background_selected.xml
+++ b/chips/res/drawable/chip_background_selected.xml
@@ -15,7 +15,7 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="#34b7e6"/>
+ <solid android:color="@color/chip_selected"/>
<padding android:left="6dp" android:right="6dp" android:top="2dp"
android:bottom="2dp"/>
</shape>
diff --git a/chips/res/drawable/list_item_background.xml b/chips/res/drawable/list_item_background.xml
index 4f48441..77e9393 100644
--- a/chips/res/drawable/list_item_background.xml
+++ b/chips/res/drawable/list_item_background.xml
@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_activated="true" android:drawable="@drawable/check_selected" />
- <item android:state_checked="true" android:drawable="@drawable/check_selected" />
- <item android:state_selected="true" android:drawable="@drawable/check_selected" />
+ <item android:state_activated="true" android:drawable="@color/list_item_selected" />
+ <item android:state_checked="true" android:drawable="@color/list_item_selected" />
+ <item android:state_selected="true" android:drawable="@color/list_item_selected" />
</selector> \ No newline at end of file
diff --git a/chips/res/drawable/list_item_font_primary.xml b/chips/res/drawable/list_item_font_primary.xml
new file mode 100644
index 0000000..4351905
--- /dev/null
+++ b/chips/res/drawable/list_item_font_primary.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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:state_checked="true" android:color="@android:color/white" />
+ <item android:state_selected="true" android:color="@android:color/white" />
+ <item android:color="#333333"/>
+ </selector> \ No newline at end of file
diff --git a/chips/res/drawable/list_item_font_secondary.xml b/chips/res/drawable/list_item_font_secondary.xml
new file mode 100644
index 0000000..78c4066
--- /dev/null
+++ b/chips/res/drawable/list_item_font_secondary.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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:state_checked="true" android:color="@android:color/white" />
+ <item android:state_selected="true" android:color="@android:color/white" />
+ <item android:color="#777777"/>
+ </selector> \ No newline at end of file
diff --git a/chips/res/layout/chips_alternate_item.xml b/chips/res/layout/chips_alternate_item.xml
index 0d4275a..9bc7b6d 100644
--- a/chips/res/layout/chips_alternate_item.xml
+++ b/chips/res/layout/chips_alternate_item.xml
@@ -14,49 +14,10 @@
limitations under the License.
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="30dip"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:background="@drawable/list_item_background">
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="left|center_vertical"
- android:layout_weight="1">
- <TextView android:id="@android:id/text1"
- android:textColor="?android:attr/textColorPrimary"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:paddingLeft="6dip"
- android:singleLine="true"
- android:ellipsize="end" />
- <TextView android:id="@android:id/text2"
- android:textColor="?android:attr/textColorSecondary"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:paddingLeft="6dip"
- android:singleLine="true"
- android:ellipsize="end" />
- </LinearLayout>
- <FrameLayout
- android:layout_width="50dip"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@android:id/icon"
- android:layout_width="42dip"
- android:layout_height="42dip"
- android:layout_margin="4dip"
- android:src="@drawable/ic_contact_picture"
- android:cropToPadding="true"
- android:scaleType="centerCrop" />
- </FrameLayout>
-</LinearLayout>
+ android:layout_height="wrap_content">
+
+ <include layout="@layout/chips_recipient_dropdown_item"/>
+
+</FrameLayout>
diff --git a/chips/res/layout/chips_recipient_dropdown_item.xml b/chips/res/layout/chips_recipient_dropdown_item.xml
index 1b11174..a8d2113 100644
--- a/chips/res/layout/chips_recipient_dropdown_item.xml
+++ b/chips/res/layout/chips_recipient_dropdown_item.xml
@@ -18,44 +18,37 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="30dip"
android:orientation="horizontal"
- android:gravity="center_vertical">
+ android:gravity="center_vertical"
+ android:background="@drawable/list_item_background">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:gravity="left|center_vertical"
android:layout_weight="1">
<TextView android:id="@android:id/text1"
- android:textColor="?android:attr/textColorPrimary"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@drawable/list_item_font_primary"
+ android:textSize="18sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:paddingLeft="6dip"
+ android:paddingLeft="8dip"
android:singleLine="true"
- android:ellipsize="end" />
+ android:ellipsize="end"
+ />
<TextView android:id="@android:id/text2"
- android:textColor="?android:attr/textColorSecondary"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@drawable/list_item_font_secondary"
+ android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:paddingLeft="6dip"
+ android:paddingLeft="16dip"
android:singleLine="true"
android:ellipsize="end" />
</LinearLayout>
- <FrameLayout
- android:layout_width="50dip"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@android:id/icon"
- android:layout_width="42dip"
- android:layout_height="42dip"
- android:layout_margin="4dip"
- android:src="@drawable/ic_contact_picture"
- android:cropToPadding="true"
- android:scaleType="centerCrop" />
- </FrameLayout>
+ <ImageView
+ android:id="@android:id/icon"
+ android:layout_width="48dip"
+ android:layout_height="48dip"
+ android:src="@drawable/ic_contact_picture"
+ android:cropToPadding="true"
+ android:scaleType="centerCrop" />
</LinearLayout>
diff --git a/chips/res/layout/chips_separator.xml b/chips/res/layout/chips_separator.xml
index f9193d4..b9dd02e 100644
--- a/chips/res/layout/chips_separator.xml
+++ b/chips/res/layout/chips_separator.xml
@@ -16,5 +16,5 @@
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="2px"
- android:background="#ff444444" />
+ android:layout_height="1dip"
+ android:background="#20000000" />
diff --git a/chips/res/layout/chips_separator_within_group.xml b/chips/res/layout/chips_separator_within_group.xml
index f823b6e..b9dd02e 100644
--- a/chips/res/layout/chips_separator_within_group.xml
+++ b/chips/res/layout/chips_separator_within_group.xml
@@ -16,5 +16,5 @@
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="1px"
- android:background="@drawable/bg_separator_inset" />
+ android:layout_height="1dip"
+ android:background="#20000000" />
diff --git a/chips/res/values/attrs.xml b/chips/res/values/attrs.xml
index 9536a7f..7294db5 100644
--- a/chips/res/values/attrs.xml
+++ b/chips/res/values/attrs.xml
@@ -19,6 +19,8 @@
<add-resource type="dimen" name="chip_height" />
<add-resource type="dimen" name="chip_text_size" />
<add-resource type="color" name="default_chip_background" />
+ <add-resource type="color" name="list_item_selected" />
+ <add-resource type="color" name="chip_selected" />
<add-resource type="string" name="more_string" />
<add-resource type="string" name="chips_waiting_for_directory_result" />
</resources>
diff --git a/chips/res/values/colors.xml b/chips/res/values/colors.xml
index 5a11dd9..d47e882 100644
--- a/chips/res/values/colors.xml
+++ b/chips/res/values/colors.xml
@@ -16,4 +16,6 @@
<resources>
<color name="default_chip_background">#77CCCCCC</color>
+ <color name="list_item_selected">#0099cc</color>
+ <color name="chip_selected">#0099cc</color>
</resources> \ No newline at end of file