summaryrefslogtreecommitdiffstats
path: root/chips/res
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2011-05-26 09:24:00 -0700
committerDaisuke Miyakawa <dmiyakawa@google.com>2011-05-27 13:00:39 -0700
commitef2f73347ae0bf87b2874b6360ff06c5f430c68f (patch)
treeed3a1539434b51f476db2522875fb95ee102ee48 /chips/res
parent24a05a268d1fa2839d62361dc50b88a4c2a2975b (diff)
downloadandroid_frameworks_ex-ef2f73347ae0bf87b2874b6360ff06c5f430c68f.tar.gz
android_frameworks_ex-ef2f73347ae0bf87b2874b6360ff06c5f430c68f.tar.bz2
android_frameworks_ex-ef2f73347ae0bf87b2874b6360ff06c5f430c68f.zip
Add sharable resources for chips UI. add phone support
Each app still needs to specify framework/ex/chips/res/ directory manually by modifying its LOCAL_RESOURCE_DIR variable in Android.mk Changed API a bit to reduce abstract methods and complexity. Bug: 4443828 Change-Id: I2a50de6d3ebd5ec6a68eeacbee21f48c1945dc8d
Diffstat (limited to 'chips/res')
-rw-r--r--chips/res/drawable-hdpi/bg_separator.9.pngbin0 -> 153 bytes
-rw-r--r--chips/res/drawable-hdpi/ic_contact_picture.pngbin0 -> 2270 bytes
-rw-r--r--chips/res/drawable-mdpi/bg_separator.9.pngbin0 -> 153 bytes
-rw-r--r--chips/res/drawable-mdpi/ic_contact_picture.pngbin0 -> 1553 bytes
-rw-r--r--chips/res/drawable/bg_separator_inset.xml19
-rw-r--r--chips/res/layout/chips_recipient_dropdown_item.xml60
-rw-r--r--chips/res/layout/chips_separator.xml20
-rw-r--r--chips/res/layout/chips_separator_within_group.xml20
8 files changed, 119 insertions, 0 deletions
diff --git a/chips/res/drawable-hdpi/bg_separator.9.png b/chips/res/drawable-hdpi/bg_separator.9.png
new file mode 100644
index 0000000..2b269e5
--- /dev/null
+++ b/chips/res/drawable-hdpi/bg_separator.9.png
Binary files differ
diff --git a/chips/res/drawable-hdpi/ic_contact_picture.png b/chips/res/drawable-hdpi/ic_contact_picture.png
new file mode 100644
index 0000000..31953dd
--- /dev/null
+++ b/chips/res/drawable-hdpi/ic_contact_picture.png
Binary files differ
diff --git a/chips/res/drawable-mdpi/bg_separator.9.png b/chips/res/drawable-mdpi/bg_separator.9.png
new file mode 100644
index 0000000..2b269e5
--- /dev/null
+++ b/chips/res/drawable-mdpi/bg_separator.9.png
Binary files differ
diff --git a/chips/res/drawable-mdpi/ic_contact_picture.png b/chips/res/drawable-mdpi/ic_contact_picture.png
new file mode 100644
index 0000000..ff6c61a
--- /dev/null
+++ b/chips/res/drawable-mdpi/ic_contact_picture.png
Binary files differ
diff --git a/chips/res/drawable/bg_separator_inset.xml b/chips/res/drawable/bg_separator_inset.xml
new file mode 100644
index 0000000..e263b81
--- /dev/null
+++ b/chips/res/drawable/bg_separator_inset.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/bg_separator"
+ android:insetLeft="50dip"/>
diff --git a/chips/res/layout/chips_recipient_dropdown_item.xml b/chips/res/layout/chips_recipient_dropdown_item.xml
new file mode 100644
index 0000000..b5c4e9d
--- /dev/null
+++ b/chips/res/layout/chips_recipient_dropdown_item.xml
@@ -0,0 +1,60 @@
+<?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.
+-->
+
+<LinearLayout
+ 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="left|center_vertical">
+ <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_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="left|center_vertical">
+ <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>
+</LinearLayout>
diff --git a/chips/res/layout/chips_separator.xml b/chips/res/layout/chips_separator.xml
new file mode 100644
index 0000000..f9193d4
--- /dev/null
+++ b/chips/res/layout/chips_separator.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="2px"
+ android:background="#ff444444" />
diff --git a/chips/res/layout/chips_separator_within_group.xml b/chips/res/layout/chips_separator_within_group.xml
new file mode 100644
index 0000000..f823b6e
--- /dev/null
+++ b/chips/res/layout/chips_separator_within_group.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+
+<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" />