summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2014-01-27 22:32:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-27 22:32:02 +0000
commit5c8f2a1ff06eda41ee2e6ff76284272660f82a10 (patch)
treeb6bde9282463d89b58ff6ed7e5947b1ffebeee4d /res
parent7572cfd53c6bcac645b1ef29f1f0a0198f124f6f (diff)
parentc0e6023ca7129914a3850bceb1a151acc75fd1f8 (diff)
downloadandroid_frameworks_opt_chips-5c8f2a1ff06eda41ee2e6ff76284272660f82a10.tar.gz
android_frameworks_opt_chips-5c8f2a1ff06eda41ee2e6ff76284272660f82a10.tar.bz2
android_frameworks_opt_chips-5c8f2a1ff06eda41ee2e6ff76284272660f82a10.zip
am 2b8b9029: Support RTL in chips library.
* commit '2b8b9029fd4e44447e59d7349c656cc32b2de9c7': Support RTL in chips library.
Diffstat (limited to 'res')
-rw-r--r--res/layout/chips_recipient_dropdown_item.xml12
-rw-r--r--res/values-v17/styles-v17.xml28
-rw-r--r--res/values/attrs.xml4
-rw-r--r--res/values/dimen.xml6
-rw-r--r--res/values/styles.xml12
5 files changed, 53 insertions, 9 deletions
diff --git a/res/layout/chips_recipient_dropdown_item.xml b/res/layout/chips_recipient_dropdown_item.xml
index cd11d67..b02b197 100644
--- a/res/layout/chips_recipient_dropdown_item.xml
+++ b/res/layout/chips_recipient_dropdown_item.xml
@@ -33,25 +33,25 @@
android:textSize="18sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="8dip"
android:singleLine="true"
- android:ellipsize="end" />
+ android:ellipsize="end"
+ style="@style/ChipTitleStyle" />
<TextView android:id="@android:id/text1"
android:textColor="@drawable/list_item_font_secondary"
android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="16dip"
android:singleLine="true"
android:ellipsize="end"
- android:layout_marginTop="-4dip" />
+ android:layout_marginTop="-4dip"
+ style="@style/ChipSubtitleStyle" />
</LinearLayout>
<ImageView
android:id="@android:id/icon"
android:layout_width="48dip"
android:layout_height="48dip"
- android:layout_marginLeft="12dip"
android:src="@drawable/ic_contact_picture"
android:cropToPadding="true"
- android:scaleType="centerCrop" />
+ android:scaleType="centerCrop"
+ style="@style/ChipIconStyle" />
</LinearLayout>
diff --git a/res/values-v17/styles-v17.xml b/res/values-v17/styles-v17.xml
new file mode 100644
index 0000000..d151a75
--- /dev/null
+++ b/res/values-v17/styles-v17.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+<resources>
+ <style name="ChipTitleStyle">
+ <item name="android:paddingStart">@dimen/chip_title_padding_start</item>
+ </style>
+
+ <style name="ChipSubtitleStyle">
+ <item name="android:paddingStart">@dimen/chip_subtitle_padding_start</item>
+ </style>
+
+ <style name="ChipIconStyle">
+ <item name="android:layout_marginStart">@dimen/chip_icon_margin_start</item>
+ </style>
+</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 6b26bcb..96d995a 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -16,8 +16,8 @@
<resources>
<declare-styleable name="RecipientEditTextView">
<attr name="avatarPosition">
- <enum name="right" value="0" />
- <enum name="left" value="1" />
+ <enum name="end" value="0" />
+ <enum name="start" value="1" />
</attr>
<attr name="chipBackground" format="reference" />
<attr name="chipBackgroundPressed" format="reference" />
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index 98354d2..f989c86 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -20,4 +20,8 @@
<dimen name="chip_text_size">14sp</dimen>
<dimen name="line_spacing_extra">4dip</dimen>
<integer name="chips_max_lines">-1</integer>
-</resources> \ No newline at end of file
+
+ <dimen name="chip_title_padding_start">8dip</dimen>
+ <dimen name="chip_subtitle_padding_start">16dip</dimen>
+ <dimen name="chip_icon_margin_start">12dip</dimen>
+</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8e2abf9..83f96b4 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -26,4 +26,16 @@
<item name="android:minHeight">48dip</item>
<item name="android:lineSpacingExtra">@dimen/line_spacing_extra</item>
</style>
+
+ <style name="ChipTitleStyle">
+ <item name="android:paddingLeft">@dimen/chip_title_padding_start</item>
+ </style>
+
+ <style name="ChipSubtitleStyle">
+ <item name="android:paddingLeft">@dimen/chip_subtitle_padding_start</item>
+ </style>
+
+ <style name="ChipIconStyle">
+ <item name="android:layout_marginLeft">@dimen/chip_icon_margin_start</item>
+ </style>
</resources>