Changes to contacts common for new dialer ui
Does not modify existing dialer behavior in any way, only
adds new classes required for new dialer UI.
New layouts/integers for new dialer lists.
Changes to support smart dial in search.
- Extends functionalities in text highligher.
- Changes pemissions in parent classes.
Change-Id: I5909b6948978a99c128d1bf955a35ecd241f1f72
diff --git a/res-common/layout/contact_tile_phone_starred.xml b/res-common/layout/contact_tile_phone_starred.xml
index e1e4970..67e3d43 100644
--- a/res-common/layout/contact_tile_phone_starred.xml
+++ b/res-common/layout/contact_tile_phone_starred.xml
@@ -48,8 +48,6 @@
android:paddingRight="47dip"
android:paddingStart="8dip"
android:paddingEnd="47dip"
- android:drawableRight="@drawable/ic_divider_dashed_holo_dark"
- android:drawableEnd="@drawable/ic_divider_dashed_holo_dark"
android:textAlignment="viewStart" />
<View
diff --git a/res-common/layout/new_contact_tile_frequent_phone.xml b/res-common/layout/new_contact_tile_frequent_phone.xml
new file mode 100644
index 0000000..360a852
--- /dev/null
+++ b/res-common/layout/new_contact_tile_frequent_phone.xml
@@ -0,0 +1,106 @@
+<?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.
+-->
+
+<!-- Layout parameters are set programmatically. -->
+<view
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/contact_tile_frequent_phone"
+ class="com.android.contacts.common.list.NewContactTilePhoneFrequentView"
+ android:focusable="true"
+ android:background="?android:attr/selectableItemBackground"
+ android:nextFocusLeft="@+id/contact_tile_quick">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <com.android.contacts.common.widget.LayoutSuppressingQuickContactBadge
+ android:id="@id/contact_tile_quick"
+ android:layout_width="64dip"
+ android:layout_height="64dip"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:nextFocusRight="@id/contact_tile_frequent_phone"
+ android:scaleType="centerCrop"
+ android:focusable="true" />
+
+ <TextView
+ android:id="@+id/contact_tile_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginTop="8dip"
+ android:layout_toRightOf="@id/contact_tile_quick"
+ android:layout_toEndOf="@id/contact_tile_quick"
+ android:singleLine="true"
+ android:fadingEdge="horizontal"
+ android:fadingEdgeLength="3dip"
+ android:ellipsize="marquee"
+ android:textAlignment="viewStart" />
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/contact_tile_name"
+ android:layout_toRightOf="@id/contact_tile_quick"
+ android:layout_toEndOf="@id/contact_tile_quick"
+ android:gravity="center_vertical">
+
+ <TextView
+ android:id="@+id/contact_tile_phone_number"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="?attr/list_item_data_width_weight"
+ android:textSize="14sp"
+ android:ellipsize="marquee"
+ android:textColor="@color/dialtacts_secondary_text_color"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:singleLine="true"
+ android:layout_gravity="bottom"
+ android:textDirection="ltr"
+ android:textAlignment="viewStart" />
+
+ <TextView
+ android:id="@+id/contact_tile_phone_type"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="?attr/list_item_label_width_weight"
+ android:textSize="12sp"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:textAllCaps="true"
+ android:textColor="@color/dialtacts_secondary_text_color"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:gravity="end"
+ android:layout_gravity="bottom" />
+
+ </LinearLayout>
+
+ <View
+ android:id="@+id/contact_tile_horizontal_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:background="?android:attr/listDivider"
+ android:layout_below="@id/contact_tile_quick" />
+
+ </RelativeLayout>
+
+</view>
diff --git a/res-common/layout/new_contact_tile_phone_starred.xml b/res-common/layout/new_contact_tile_phone_starred.xml
new file mode 100644
index 0000000..4862810
--- /dev/null
+++ b/res-common/layout/new_contact_tile_phone_starred.xml
@@ -0,0 +1,78 @@
+<?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:background="@null"
+ android:paddingBottom="1dip"
+ android:paddingRight="1dip"
+ android:paddingEnd="1dip"
+ class="com.android.contacts.common.list.NewContactTilePhoneStarredView" >
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <com.android.contacts.common.widget.LayoutSuppressingImageView
+ android:id="@+id/contact_tile_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop" />
+
+ <TextView
+ android:id="@+id/contact_tile_name"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/contact_tile_shadowbox_height"
+ android:background="@color/contact_tile_shadow_box_color"
+ android:gravity="center_vertical"
+ android:textColor="@android:color/white"
+ android:singleLine="true"
+ android:textSize="16sp"
+ android:fadingEdge="horizontal"
+ android:fadingEdgeLength="3dip"
+ android:ellipsize="marquee"
+ android:layout_alignParentBottom="true"
+ android:paddingLeft="8dip"
+ android:paddingRight="47dip"
+ android:paddingStart="8dip"
+ android:paddingEnd="47dip"
+ android:textAlignment="viewStart" />
+
+ <View
+ android:id="@+id/contact_tile_push_state"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:nextFocusRight="@+id/contact_tile_secondary_button"
+ android:background="?android:attr/selectableItemBackground" />
+
+ <ImageButton
+ android:id="@id/contact_tile_secondary_button"
+ android:src="@drawable/ic_contacts_holo_dark"
+ android:background="?android:attr/selectableItemBackground"
+ android:layout_height="@dimen/contact_tile_shadowbox_height"
+ android:layout_width="48dip"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:paddingStart="8dip"
+ android:paddingEnd="8dip"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentEnd="true"
+ android:contentDescription="@string/description_view_contact_detail" />
+
+ </RelativeLayout>
+
+</view>
diff --git a/res-common/values/integers.xml b/res-common/values/integers.xml
index f3b54a4..e5211d1 100644
--- a/res-common/values/integers.xml
+++ b/res-common/values/integers.xml
@@ -19,6 +19,7 @@
<!-- Determines the number of columns in a ContactTileRow in the favorites tab -->
<integer name="contact_tile_column_count_in_favorites">2</integer>
+ <integer name="contact_tile_column_count_in_favorites_new">3</integer>
<!-- The number of characters in the snippet before we need to tokenize and ellipse. -->
<integer name="snippet_length_before_tokenize">30</integer>