Merge "Redlines for CallDetailActivity (call history items and voicemails)"
diff --git a/res/drawable-hdpi/ic_dial_action_vm.png b/res/drawable-hdpi/ic_dial_action_vm.png
new file mode 100644
index 0000000..68ee3d6
--- /dev/null
+++ b/res/drawable-hdpi/ic_dial_action_vm.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_all_contacts_dk.png b/res/drawable-hdpi/ic_menu_all_contacts_dk.png
new file mode 100644
index 0000000..88ba4f1
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_all_contacts_dk.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialer_menu_dialpad_dk.png b/res/drawable-hdpi/ic_menu_dialpad_dk.png
similarity index 100%
rename from res/drawable-hdpi/ic_dialer_menu_dialpad_dk.png
rename to res/drawable-hdpi/ic_menu_dialpad_dk.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialer_menu_history_dk.png b/res/drawable-hdpi/ic_menu_history_dk.png
similarity index 100%
rename from res/drawable-hdpi/ic_dialer_menu_history_dk.png
rename to res/drawable-hdpi/ic_menu_history_dk.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_history_lt.png b/res/drawable-hdpi/ic_menu_history_lt.png
new file mode 100644
index 0000000..a36323c
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_history_lt.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_overflow_dark.png b/res/drawable-hdpi/ic_menu_overflow_dk.png
similarity index 100%
rename from res/drawable-hdpi/ic_menu_overflow_dark.png
rename to res/drawable-hdpi/ic_menu_overflow_dk.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_overflow_lt.png b/res/drawable-hdpi/ic_menu_overflow_lt.png
new file mode 100644
index 0000000..2561b8c
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_overflow_lt.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_voice_search.png b/res/drawable-hdpi/ic_voice_search.png
new file mode 100644
index 0000000..6caf4a4
--- /dev/null
+++ b/res/drawable-hdpi/ic_voice_search.png
Binary files differ
diff --git a/res/drawable-hdpi/shadow_contact_photo.png b/res/drawable-hdpi/shadow_contact_photo.png
new file mode 100644
index 0000000..49cbb97
--- /dev/null
+++ b/res/drawable-hdpi/shadow_contact_photo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_dial_action_vm.png b/res/drawable-mdpi/ic_dial_action_vm.png
new file mode 100644
index 0000000..5b91b42
--- /dev/null
+++ b/res/drawable-mdpi/ic_dial_action_vm.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_all_contacts_dk.png b/res/drawable-mdpi/ic_menu_all_contacts_dk.png
new file mode 100644
index 0000000..03af9c4
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_all_contacts_dk.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_dialer_menu_dialpad_dk.png b/res/drawable-mdpi/ic_menu_dialpad_dk.png
similarity index 100%
rename from res/drawable-mdpi/ic_dialer_menu_dialpad_dk.png
rename to res/drawable-mdpi/ic_menu_dialpad_dk.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_dialer_menu_history_dk.png b/res/drawable-mdpi/ic_menu_history_dk.png
similarity index 100%
rename from res/drawable-mdpi/ic_dialer_menu_history_dk.png
rename to res/drawable-mdpi/ic_menu_history_dk.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_history_lt.png b/res/drawable-mdpi/ic_menu_history_lt.png
new file mode 100644
index 0000000..3597a5e
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_history_lt.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_overflow_dark.png b/res/drawable-mdpi/ic_menu_overflow_dk.png
similarity index 100%
rename from res/drawable-mdpi/ic_menu_overflow_dark.png
rename to res/drawable-mdpi/ic_menu_overflow_dk.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_overflow_lt.png b/res/drawable-mdpi/ic_menu_overflow_lt.png
new file mode 100644
index 0000000..7dc68c9
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_overflow_lt.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_voice_search.png b/res/drawable-mdpi/ic_voice_search.png
new file mode 100644
index 0000000..e290f92
--- /dev/null
+++ b/res/drawable-mdpi/ic_voice_search.png
Binary files differ
diff --git a/res/drawable-mdpi/shadow_contact_photo.png b/res/drawable-mdpi/shadow_contact_photo.png
new file mode 100644
index 0000000..4734bbd
--- /dev/null
+++ b/res/drawable-mdpi/shadow_contact_photo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dial_action_vm.png b/res/drawable-xhdpi/ic_dial_action_vm.png
new file mode 100644
index 0000000..269fd1a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dial_action_vm.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_all_contacts_dk.png b/res/drawable-xhdpi/ic_menu_all_contacts_dk.png
new file mode 100644
index 0000000..11bd615
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_all_contacts_dk.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialer_menu_dialpad_dk.png b/res/drawable-xhdpi/ic_menu_dialpad_dk.png
similarity index 100%
rename from res/drawable-xhdpi/ic_dialer_menu_dialpad_dk.png
rename to res/drawable-xhdpi/ic_menu_dialpad_dk.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialer_menu_history_dk.png b/res/drawable-xhdpi/ic_menu_history_dk.png
similarity index 100%
rename from res/drawable-xhdpi/ic_dialer_menu_history_dk.png
rename to res/drawable-xhdpi/ic_menu_history_dk.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_history_lt.png b/res/drawable-xhdpi/ic_menu_history_lt.png
new file mode 100644
index 0000000..6b411cb
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_history_lt.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_overflow_dark.png b/res/drawable-xhdpi/ic_menu_overflow_dk.png
similarity index 100%
rename from res/drawable-xhdpi/ic_menu_overflow_dark.png
rename to res/drawable-xhdpi/ic_menu_overflow_dk.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_overflow_lt.png b/res/drawable-xhdpi/ic_menu_overflow_lt.png
new file mode 100644
index 0000000..95e436c
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_overflow_lt.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_voice_search.png b/res/drawable-xhdpi/ic_voice_search.png
new file mode 100644
index 0000000..6147581
--- /dev/null
+++ b/res/drawable-xhdpi/ic_voice_search.png
Binary files differ
diff --git a/res/drawable-xhdpi/shadow_contact_photo.png b/res/drawable-xhdpi/shadow_contact_photo.png
new file mode 100644
index 0000000..1077ec1
--- /dev/null
+++ b/res/drawable-xhdpi/shadow_contact_photo.png
Binary files differ
diff --git a/res/layout/dialpad_key.xml b/res/layout/dialpad_key.xml
new file mode 100644
index 0000000..b204c20
--- /dev/null
+++ b/res/layout/dialpad_key.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<!-- A layout representing a single key in the dialpad -->
+<com.android.dialer.dialpad.DialpadKeyButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/DialtactsDialpadButtonStyle"
+ android:clickable="true" >
+ <TextView
+ android:id="@+id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_primary_text_color"
+ android:textSize="@dimen/dialpad_key_numbers_size"
+ android:fontFamily="sans-serif-light"
+ android:layout_centerInParent="true"
+ />
+ <TextView
+ android:id="@+id/dialpad_key_letters"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_secondary_text_color"
+ android:textSize="@dimen/dialpad_key_letters_size"
+ android:paddingRight="11dp"
+ android:layout_alignBaseline="@id/dialpad_key_number"
+ android:fontFamily="sans-serif-light"
+ android:layout_alignParentRight="true"
+ />
+</com.android.dialer.dialpad.DialpadKeyButton>
\ No newline at end of file
diff --git a/res/layout/new_dialpad.xml b/res/layout/new_dialpad.xml
index 29f9cf0..60240bc 100644
--- a/res/layout/new_dialpad.xml
+++ b/res/layout/new_dialpad.xml
@@ -26,73 +26,86 @@
android:paddingStart="5dip"
android:paddingEnd="5dip"
android:paddingBottom="10dip"
+ android:stretchColumns="0,1,2"
android:layoutDirection="ltr" >
<TableRow
- android:layout_height="0px"
- android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_1_wht"
- android:contentDescription="@string/description_image_button_one" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/two" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_2_wht"
- android:contentDescription="@string/description_image_button_two" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/three" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_3_wht"
- android:contentDescription="@string/description_image_button_three" />
+ android:layout_height="0px"
+ android:layout_weight="1">
+ <com.android.dialer.dialpad.DialpadKeyButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/one"
+ style="@style/DialtactsDialpadButtonStyle"
+ android:clickable="true" >
+ <TextView
+ android:id="@+id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_primary_text_color"
+ android:textSize="@dimen/dialpad_key_numbers_size"
+ android:fontFamily="sans-serif-light"
+ android:layout_centerInParent="true" />
+ <ImageView
+ android:id="@+id/dialpad_key_voicemail"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_dial_action_vm"
+ android:paddingRight="11dp"
+ android:layout_alignBaseline="@id/dialpad_key_number"
+ android:baselineAlignBottom="true"
+ android:layout_alignParentRight="true" />
+ </com.android.dialer.dialpad.DialpadKeyButton>
+ <include layout="@layout/dialpad_key" android:id="@+id/two"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/three"/>
</TableRow>
<TableRow
- android:layout_height="0px"
- android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/four" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_4_wht"
- android:contentDescription="@string/description_image_button_four" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/five" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_5_wht"
- android:contentDescription="@string/description_image_button_five" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/six" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_6_wht"
- android:contentDescription="@string/description_image_button_six" />
+ android:layout_height="0px"
+ android:layout_weight="1">
+ <include layout="@layout/dialpad_key" android:id="@+id/four"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/five"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/six"/>
</TableRow>
<TableRow
- android:layout_height="0px"
- android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/seven" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_7_wht"
- android:contentDescription="@string/description_image_button_seven" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/eight" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_8_wht"
- android:contentDescription="@string/description_image_button_eight" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/nine" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_9_wht"
- android:contentDescription="@string/description_image_button_nine" />
+ android:layout_height="0px"
+ android:layout_weight="1">
+ <include layout="@layout/dialpad_key" android:id="@+id/seven"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/eight"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/nine"/>
</TableRow>
<TableRow
- android:layout_height="0px"
- android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/star" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_star_wht"
- android:contentDescription="@string/description_image_button_star" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/zero" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_0_wht"
- android:contentDescription="@string/description_image_button_zero" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/pound" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_pound_wht"
- android:contentDescription="@string/description_image_button_pound" />
+ android:layout_height="0px"
+ android:layout_weight="1">
+ <com.android.dialer.dialpad.DialpadKeyButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/star"
+ style="@style/DialtactsDialpadButtonStyle"
+ android:clickable="true" >
+ <TextView
+ android:id="@id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_secondary_text_color"
+ android:textSize="@dimen/dialpad_key_special_characters_size"
+ android:fontFamily="sans-serif-light"
+ android:layout_centerInParent="true" />
+ </com.android.dialer.dialpad.DialpadKeyButton>
+ <include layout="@layout/dialpad_key" android:id="@+id/zero"/>
+ <com.android.dialer.dialpad.DialpadKeyButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pound"
+ style="@style/DialtactsDialpadButtonStyle"
+ android:clickable="true" >
+ <TextView
+ android:id="@id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_secondary_text_color"
+ android:textSize="@dimen/dialpad_key_special_characters_size"
+ android:fontFamily="sans-serif-light"
+ android:layout_centerInParent="true" />
+ </com.android.dialer.dialpad.DialpadKeyButton>
</TableRow>
</TableLayout>
diff --git a/res/layout/new_dialpad_fragment.xml b/res/layout/new_dialpad_fragment.xml
index 2026781..f6f652c 100644
--- a/res/layout/new_dialpad_fragment.xml
+++ b/res/layout/new_dialpad_fragment.xml
@@ -19,7 +19,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- spacer view -->
- <View
+ <Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
@@ -85,9 +85,9 @@
android:layout_height="@dimen/fake_action_bar_height"
android:layout_width="@dimen/fake_menu_button_min_width"
android:layout_gravity="bottom|start"
- android:background="?android:attr/selectableItemBackground"
+ android:background="@drawable/btn_call"
android:contentDescription="@string/action_menu_call_history_description"
- android:src="@drawable/ic_dialer_menu_history_dk"/>
+ android:src="@drawable/ic_menu_history_lt"/>
<ImageButton
android:id="@+id/dialButton"
android:layout_width="0dp"
@@ -103,8 +103,8 @@
android:layout_height="@dimen/fake_action_bar_height"
android:layout_width="@dimen/fake_menu_button_min_width"
android:layout_gravity="bottom|end"
- android:background="?android:attr/selectableItemBackground"
- android:src="@drawable/ic_menu_overflow_dark"
+ android:background="@drawable/btn_call"
+ android:src="@drawable/ic_menu_overflow_lt"
android:contentDescription="@string/action_menu_overflow_description" />
</LinearLayout>
@@ -119,4 +119,4 @@
/>
</LinearLayout>
-</view>
\ No newline at end of file
+</view>
diff --git a/res/layout/new_dialtacts_activity.xml b/res/layout/new_dialtacts_activity.xml
index 7845d0f..b9d417b 100644
--- a/res/layout/new_dialtacts_activity.xml
+++ b/res/layout/new_dialtacts_activity.xml
@@ -49,8 +49,18 @@
android:layout_width="40dp"
android:padding="6dp"
android:src="@drawable/ic_close_dk"
+ android:clickable="true"
android:background="?android:attr/selectableItemBackground"
android:visibility="gone" />
+ <ImageView
+ android:id="@+id/voice_search_button"
+ android:layout_height="40dp"
+ android:layout_width="40dp"
+ android:padding="6dp"
+ android:src="@drawable/ic_voice_search"
+ android:clickable="true"
+ android:contentDescription="@string/description_start_voice_search"
+ android:background="?android:attr/selectableItemBackground" />
</LinearLayout>
<FrameLayout
android:layout_height="0dp"
diff --git a/res/layout/new_phone_favorites_fragment.xml b/res/layout/new_phone_favorites_fragment.xml
index cc11ea1..2b6bbe4 100644
--- a/res/layout/new_phone_favorites_fragment.xml
+++ b/res/layout/new_phone_favorites_fragment.xml
@@ -58,7 +58,7 @@
android:layout_gravity="bottom|start"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/action_menu_call_history_description"
- android:src="@drawable/ic_dialer_menu_history_dk"/>
+ android:src="@drawable/ic_menu_history_dk"/>
<ImageButton
android:id="@+id/dialpad_button"
android:layout_width="@dimen/fake_menu_button_min_width"
@@ -66,13 +66,13 @@
android:layout_gravity="bottom|center"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/description_search_button"
- android:src="@drawable/ic_dialer_menu_dialpad_dk"/>
+ android:src="@drawable/ic_menu_dialpad_dk"/>
<ImageButton
android:id="@+id/overflow_menu"
android:layout_width="@dimen/fake_menu_button_min_width"
android:layout_height="match_parent"
android:layout_gravity="bottom|end"
- android:src="@drawable/ic_menu_overflow_dark"
+ android:src="@drawable/ic_menu_overflow_dk"
android:contentDescription="@string/action_menu_overflow_description"
android:background="?android:attr/selectableItemBackground"/>
</FrameLayout>
diff --git a/res/layout/phone_favorite_regular_row_view.xml b/res/layout/phone_favorite_regular_row_view.xml
index eda5a02..532e858 100644
--- a/res/layout/phone_favorite_regular_row_view.xml
+++ b/res/layout/phone_favorite_regular_row_view.xml
@@ -18,14 +18,14 @@
<view
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contact_tile_frequent_phone"
- class="com.android.dialer.list.PhoneFavoriteRegularRowView"
- android:focusable="true"
- android:background="?android:attr/selectableItemBackground"
- android:nextFocusLeft="@+id/contact_tile_quick">
+ class="com.android.dialer.list.PhoneFavoriteRegularRowView">
<RelativeLayout
+ android:id="@+id/contact_favorite_card"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:background="?android:attr/selectableItemBackground" >
<com.android.contacts.common.widget.LayoutSuppressingQuickContactBadge
android:id="@id/contact_tile_quick"
@@ -54,4 +54,46 @@
android:textAlignment="viewStart" />
</RelativeLayout>
+ <LinearLayout
+ android:id="@+id/favorite_remove_dialogue"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:gravity="center_vertical"
+ android:alpha="0.0"
+ android:visibility="gone">
+
+ <TextView
+ android:id="@+id/favorite_remove_dialogue_text"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:text="@string/favorite_hidden"
+ android:ellipsize="marquee"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:singleLine="true"
+ android:layout_gravity="center_vertical"
+ android:textDirection="ltr"
+ android:textAlignment="viewStart" />
+
+ <TextView
+ android:id="@+id/favorite_remove_undo_button"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="0.5"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:text="@string/favorite_hidden_undo"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:gravity="end"
+ android:layout_gravity="center_vertical"
+ android:clickable="true"/>
+
+ </LinearLayout>
</view>
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index bf90205..2865c2a 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -19,11 +19,14 @@
android:paddingBottom="1dip"
android:paddingRight="1dip"
android:paddingEnd="1dip"
- class="com.android.dialer.list.PhoneFavoriteTileView" >
+ class="com.android.dialer.list.PhoneFavoriteSquareTileView" >
<RelativeLayout
+ android:id="@+id/contact_tile_favorite_card"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:background="?android:attr/selectableItemBackground" >>
<com.android.contacts.common.widget.LayoutSuppressingImageView
android:id="@+id/contact_tile_image"
@@ -31,23 +34,29 @@
android:layout_height="match_parent"
android:scaleType="centerCrop" />
+ <View
+ android:id="@+id/shadow_overlay"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/shadow_contact_photo"/>
+
<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:layout_height="@dimen/contact_tile_info_button_height_and_width"
android:gravity="center_vertical"
- android:textColor="@android:color/white"
+ android:textColor="@color/contact_tile_name_color"
+ android:fontFamily="sans-serif-light"
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:paddingLeft="8dp"
+ android:paddingRight="@dimen/contact_tile_info_button_height_and_width"
+ android:paddingStart="8dp"
+ android:paddingEnd="@dimen/contact_tile_info_button_height_and_width"
android:textAlignment="viewStart" />
<View
@@ -62,14 +71,14 @@
android:id="@id/contact_tile_secondary_button"
android:src="@drawable/ic_contact_info"
android:background="?android:attr/selectableItemBackground"
- android:layout_height="@dimen/contact_tile_shadowbox_height"
- android:layout_width="48dip"
- android:paddingLeft="12dip"
- android:paddingRight="12dip"
- android:paddingStart="12dip"
- android:paddingEnd="12dip"
- android:paddingTop="12dip"
- android:paddingBottom="12dip"
+ android:layout_height="@dimen/contact_tile_info_button_height_and_width"
+ android:layout_width="@dimen/contact_tile_info_button_height_and_width"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingStart="8dp"
+ android:paddingEnd="8dp"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
@@ -77,4 +86,47 @@
</RelativeLayout>
+ <LinearLayout
+ android:id="@+id/favorite_tile_remove_dialogue"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:gravity="center_horizontal"
+ android:alpha="0.0"
+ android:visibility="gone">
+
+ <TextView
+ android:id="@+id/favorite_tile_remove_dialogue_text"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:text="@string/favorite_hidden"
+ android:ellipsize="marquee"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:singleLine="true"
+ android:layout_gravity="center_horizontal"
+ android:textDirection="ltr"
+ android:textAlignment="viewStart" />
+
+ <TextView
+ android:id="@+id/favorite_tile_remove_undo_button"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="0.5"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:text="@string/favorite_hidden_undo"
+ android:layout_marginLeft="8dip"
+ android:layout_marginStart="8dip"
+ android:gravity="end"
+ android:layout_gravity="center_horizontal"
+ android:clickable="true"/>
+
+ </LinearLayout>
+
</view>
diff --git a/res/layout/show_all_contact_button.xml b/res/layout/show_all_contact_button.xml
new file mode 100644
index 0000000..824d10c
--- /dev/null
+++ b/res/layout/show_all_contact_button.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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:id="@+id/show_all_contact_button"
+ android:orientation="horizontal"
+ android:clickable="true"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:gravity="center"
+ android:background="?android:attr/selectableItemBackground"
+ android:focusable="true">
+
+ <ImageView
+ android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:layout_gravity="center"
+ android:src="@drawable/ic_menu_all_contacts_dk"
+ android:layout_marginEnd="10dp"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:textSize="14sp"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:text="@string/show_all_contacts_button_text"
+ android:textAlignment="center"
+ android:gravity="center"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/show_all_contacts_fragment.xml b/res/layout/show_all_contacts_fragment.xml
new file mode 100644
index 0000000..0a95f27
--- /dev/null
+++ b/res/layout/show_all_contacts_fragment.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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:id="@+id/pinned_header_list_layout"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="?android:attr/actionBarSize">
+
+ <!-- Shown only when an Account filter is set.
+ - paddingTop should be here to show "shade" effect correctly. -->
+ <!-- TODO {klp} Remove the filter header. -->
+ <include
+ android:id="@+id/account_filter_header_container"
+ layout="@layout/account_filter_header" />
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1" >
+ <view
+ class="com.android.contacts.common.list.PinnedHeaderListView"
+ style="@style/NewDialtactsTheme"
+ android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="?attr/contact_browser_list_padding_left"
+ android:layout_marginRight="?attr/contact_browser_list_padding_right"
+ android:layout_marginStart="?attr/contact_browser_list_padding_left"
+ android:layout_marginEnd="?attr/contact_browser_list_padding_right"
+ android:fastScrollEnabled="true"
+ android:fadingEdge="none"/>
+ </FrameLayout>
+
+</LinearLayout>
diff --git a/res/menu/dialpad_options_new.xml b/res/menu/dialpad_options_new.xml
new file mode 100644
index 0000000..0727dd5
--- /dev/null
+++ b/res/menu/dialpad_options_new.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_add_contacts"
+ android:title="@string/recentCalls_addToContact"
+ android:showAsAction="withText"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/menu_2s_pause"
+ android:title="@string/add_2sec_pause"
+ android:showAsAction="withText"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/menu_add_wait"
+ android:title="@string/add_wait"
+ android:showAsAction="withText"
+ android:orderInCategory="1" />
+</menu>
diff --git a/res/menu/dialtacts_options_new.xml b/res/menu/dialtacts_options_new.xml
index 92708fe..b306979 100644
--- a/res/menu/dialtacts_options_new.xml
+++ b/res/menu/dialtacts_options_new.xml
@@ -24,9 +24,6 @@
android:id="@+id/add_contact"
android:title="@string/menu_newContact"/>
<item
- android:id="@+id/menu_show_hide_all_contacts"
- android:title="@string/show_all_contacts" />
- <item
android:id="@+id/menu_call_settings"
android:title="@string/call_settings"
android:orderInCategory="2" />
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 5309344..d46a173 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"bel"</string>
<string name="description_delete_button" msgid="6263102114033407382">"terugvee"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nommer om te skakel"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Oproepgeskiedenis"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Meer opsies"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopieer"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Wys slegs uitgaande"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 1a947d8..e2b5593 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"ደውል"</string>
<string name="description_delete_button" msgid="6263102114033407382">"የኋሊት ደምሳሽ"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"ቁጥር ለመደወል"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"የስልክ ጥሪ ታሪክ"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"ተጨማሪ አማራጮች"</string>
<string name="menu_copy" msgid="6108677035381940698">"ቅዳ"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"ወጪዎቹን ብቻ አሳይ"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 158b095..f05ad3f 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"طلب"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"الرقم الذي سيتم طلبه"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"سجل المكالمات"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"مزيد من الخيارات"</string>
<string name="menu_copy" msgid="6108677035381940698">"نسخ"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"عرض الصادر فقط"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 89f255f..430cfa2 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"набор"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"нумар для набору"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Дадатковыя параметры"</string>
<string name="menu_copy" msgid="6108677035381940698">"Капіраваць"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Паказаць толькі выходныя"</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index d7f5959..fd5ff4b 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"набиране"</string>
<string name="description_delete_button" msgid="6263102114033407382">"назад"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"номер за набиране"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Още опции"</string>
<string name="menu_copy" msgid="6108677035381940698">"Копиране"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Показване само на изходящите"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Няма скорошни гласови съобщения."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Показване на всички контакти"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Показване само на любимите"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"История"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 2e9e970..0df7d8b 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"marca"</string>
<string name="description_delete_button" msgid="6263102114033407382">"retrocés"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"número que es marcarà"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Historial de trucades"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Més opcions"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copia"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Mostra només trucades sortints"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 906a899..5818768 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"vytáčení"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"číslo, které chcete vytočit"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Historie volání"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Více možností"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopírovat"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Zobrazit pouze odchozí"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index a5dfb2b..e937847 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"ring op"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nummer at ringe op"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Opkaldshistorik"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Flere valgmuligheder"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiér"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Vis kun udgående"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 5eba43b..2a53943 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"wählen"</string>
<string name="description_delete_button" msgid="6263102114033407382">"Rücktaste"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"Zu wählende Nummer"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Anrufliste"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Mehr Optionen"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopieren"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Nur ausgehende Anrufe anzeigen"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Keine Mailbox-Nachrichten"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Alle Kontakte anzeigen"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Nur Favoriten anzeigen"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Verlauf"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index a72c67e..bf61b60 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"κλήση"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"αριθμός για κλήση"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Ιστορικό κλήσεων"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Περισσότερες επιλογές"</string>
<string name="menu_copy" msgid="6108677035381940698">"Αντιγραφή"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Εμφάνιση μόνο εξερχόμενων"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 329a693..809cf1c 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"dial"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"number to dial"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Call History"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"More options"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copy"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Show outgoing only"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 3368c10..72ec7c8 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"marcar"</string>
<string name="description_delete_button" msgid="6263102114033407382">"retroceso"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"número para marcar"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Más opciones"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copiar"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Mostrar solo salientes"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"No hay mensajes del buzón de voz recientes."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Mostrar todos los contactos"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Mostrar solo favoritos"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Historial"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 4442b62..984c0ee 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"marcar"</string>
<string name="description_delete_button" msgid="6263102114033407382">"retroceder un espacio"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"número que se va a marcar"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Historial de llamadas"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Más opciones"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copiar"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Mostrar solo llamadas salientes"</string>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 767a972..93c27b8 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"Helista"</string>
<string name="description_delete_button" msgid="6263102114033407382">"tagasilüke"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"number valimiseks"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Kõneajalugu"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Rohkem valikuid"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopeeri"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Kuva ainult väljuvad"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Pole ühtegi hiljutist kõnepostiteadet."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Kuva kõik kontaktid"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Kuva ainult lemmikud"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Ajalugu"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index f0244c5..ec181bc 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"شماره گیری"</string>
<string name="description_delete_button" msgid="6263102114033407382">"Backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"شماره برای شماره گیری"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"سابقه تماس"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"گزینههای بیشتر"</string>
<string name="menu_copy" msgid="6108677035381940698">"کپی"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"فقط نمایش خروجی"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"اخیراً هیچ پست صوتی نداشتهاید."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"نمایش همه مخاطبین"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"فقط نمایش موارد دلخواه"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"سابقه"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index e4c1fa0..0467092 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"soita"</string>
<string name="description_delete_button" msgid="6263102114033407382">"askelpalautin"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numero johon soitetaan"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Soittohistoria"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Lisää vaihtoehtoja"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopioi"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Näytä vain soitetut"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Ei uusia viestejä vastaajassa."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Näytä kaikki yhteystiedot"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Näytä vain suosikit"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Historia"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index d83c512..caade3a 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"composer"</string>
<string name="description_delete_button" msgid="6263102114033407382">"retour arrière"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numéro à composer"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Plus d\'options"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copier"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Afficher appels sortants uniq."</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Aucun message vocal récent"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Afficher tous les contacts"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Afficher les contacts ajoutés aux favoris uniquement"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Historique"</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 77facaa..9ae8edd 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"डायल करें"</string>
<string name="description_delete_button" msgid="6263102114033407382">"हटाएं"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"डायल करने के लिए नंबर"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"कॉल इतिहास"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"अधिक विकल्प"</string>
<string name="menu_copy" msgid="6108677035381940698">"प्रतिलिपि"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"केवल आउटगोइंग ही दिखाएं"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index a57e8be..16fa3f6 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"biraj"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"broj za pozivanje"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Povijest poziva"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Više opcija"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiranje"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Prikaži samo odlazne"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 2d99a75..8c761fc 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"tárcsázás"</string>
<string name="description_delete_button" msgid="6263102114033407382">"Backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"a tárcsázandó szám"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Hívási előzmények"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"További beállítások"</string>
<string name="menu_copy" msgid="6108677035381940698">"Másolás"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Csak a kimenők megjelenítése"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 81abeac..5c22006 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"panggil"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nomor untuk dipanggil"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Opsi lainnya"</string>
<string name="menu_copy" msgid="6108677035381940698">"Salin"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Tampilkan panggilan keluar"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Tidak ada pesan suara terbaru."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Tampilkan semua kontak"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Hanya tampilkan favorit"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Riwayat"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 6b2d875..1c091a7 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"componi"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numero da comporre"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Cronologia chiamate"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Altre opzioni"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copia"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Mostra solo in uscita"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index ce05262..64d9a9a 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"חייג"</string>
<string name="description_delete_button" msgid="6263102114033407382">"Backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"מספר לחיוג"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"היסטוריית שיחות"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"אפשרויות נוספות"</string>
<string name="menu_copy" msgid="6108677035381940698">"העתק"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"הצג רק שיחות יוצאות"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"אין הודעות דואר קולי אחרונות."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"הצג את כל אנשי הקשר"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"הצג מועדפים בלבד"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"היסטוריה"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 31e9300..42336ef 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"発信"</string>
<string name="description_delete_button" msgid="6263102114033407382">"Backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"発信番号"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"通話履歴"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"その他のオプション"</string>
<string name="menu_copy" msgid="6108677035381940698">"コピー"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"発信のみを表示"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"最近のボイスメールはありません。"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"すべての連絡先を表示"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"お気に入りのみを表示"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"履歴"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 5cee4ef..a104018 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"전화걸기"</string>
<string name="description_delete_button" msgid="6263102114033407382">"백스페이스"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"전화를 걸 번호"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"옵션 더보기"</string>
<string name="menu_copy" msgid="6108677035381940698">"복사"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"발신 전화만 표시"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"최근 음성사서함이 없습니다."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"모든 연락처 표시"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"즐겨찾는 연락처만 표시"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"기록"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 692cc69..0e88b32 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"rinkti numerį"</string>
<string name="description_delete_button" msgid="6263102114033407382">"naikinimo klavišas"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"renkamas numeris"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Skambučių istorija"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Daugiau parinkčių"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopijuoti"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Rodyti tik išsiunčiamus"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 12bf57a..71a28fe 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"sastādīt numuru"</string>
<string name="description_delete_button" msgid="6263102114033407382">"atpakaļatkāpe"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"sastādītais numurs"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Zvanu vēsture"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Vairāk opciju"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopēt"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Rādīt tikai izejošos zvanus"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Nav nesenu balss pasta ziņojumu."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Rādīt visas kontaktpersonas"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Rādīt tikai izlasi"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Vēsture"</string>
</resources>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 05df3a1..bd30e5e 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"dail"</string>
<string name="description_delete_button" msgid="6263102114033407382">"undur ruang"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nombor untuk didail"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Lagi pilihan"</string>
<string name="menu_copy" msgid="6108677035381940698">"Salin"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Tunjuk panggilan keluar shj"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Tiada mel suara terbaru."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Tunjukkan semua kenalan"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Tunjukkan kegemaran sahaja"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Sejarah"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 64d3181..d10fb2e 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"ring"</string>
<string name="description_delete_button" msgid="6263102114033407382">"tilbaketast"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"ring til"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Anropslogg"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Flere alternativer"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiér"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Vis bare utgående"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index e4ff8b0..14d1946 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"bellen"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nummer om te bellen"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Oproepgeschiedenis"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Meer opties"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiëren"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Alleen uitgaand weergeven"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 695416a..b01a8fe 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"wybierz numer"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numer do wybrania"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Historia połączeń"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Więcej opcji"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiuj"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Pokaż tylko wychodzące"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 820d581..3a3c6c8 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"marcar"</string>
<string name="description_delete_button" msgid="6263102114033407382">"retrocesso"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"número a marcar"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Histórico de Chamadas"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Mais opções"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copiar"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Mostrar apenas cham. efetuadas"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index c0462b9..74f0a02 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"discar"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"número para discagem"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Mais opções"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copiar"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Mostrar apenas enviadas"</string>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index 9375776..5fd6541 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -114,6 +114,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"cumponer"</string>
<string name="description_delete_button" msgid="6263102114033407382">"tasta da return"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numer da cumponer"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<!-- no translation found for action_menu_overflow_description (2303272250613084574) -->
<!-- no translation found for action_menu_overflow_description (2295659037509008453) -->
<skip />
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index f107ee6..dea770c 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"apelaţi"</string>
<string name="description_delete_button" msgid="6263102114033407382">"tasta backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numărul de apelat"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Mai multe opţiuni"</string>
<string name="menu_copy" msgid="6108677035381940698">"Copiaţi"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Numai apelurile efectuate"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Nu există mesaje vocale recente."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Afișați toate persoanele de contact"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Afișați numai preferate"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Istoric"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 93fbb6e..905f230 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"набор номера"</string>
<string name="description_delete_button" msgid="6263102114033407382">"удаление последнего символа"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"набираемый номер"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Ещё"</string>
<string name="menu_copy" msgid="6108677035381940698">"Копировать"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Исходящие"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Нет новых голосовых сообщений"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Все контакты"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Только часто используемые"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"История"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 5c2a599..6c2e229 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"vytáčanie"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"číslo, ktoré chcete vytočiť"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Ďalšie možnosti"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopírovať"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Zobraziť len odchádzajúce"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Žiadne nedávne hlasové správy."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Zobraziť všetky kontakty"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Zobraziť iba obľúbené"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"História"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 5f30c33..8f12142 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"pokliči"</string>
<string name="description_delete_button" msgid="6263102114033407382">"vračalka"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"številka, ki bo poklicana"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Več možnosti"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiraj"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Pokaži samo odhodne"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 5087ac5..1708718 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"бирање"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"број за бирање"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Историја позива"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Још опција"</string>
<string name="menu_copy" msgid="6108677035381940698">"Копирај"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Прикажи само одлазне"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 2f91b46..c754492 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"ring"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backsteg"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nummer att ringa"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Samtalshistorik"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Fler alternativ"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopiera"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Visa endast utgående samtal"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 482fbac..1b5f2dc 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"piga simu"</string>
<string name="description_delete_button" msgid="6263102114033407382">"futa"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"nambari ya kupiga"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Historia ya Simu"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Chaguo zaidi"</string>
<string name="menu_copy" msgid="6108677035381940698">"Nakili"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Onyesha zinazotoka pekee"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Hakuna ujumbe wa sauti wa hivi karibuni."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Onyesha anwani zote"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Onyesha zinazopendwa tu"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Historia"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index c38740f..092f3c9 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"หมุนหมายเลข"</string>
<string name="description_delete_button" msgid="6263102114033407382">"ย้อนกลับ"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"หมายเลขที่จะโทร"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"ประวัติการโทร"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"ตัวเลือกเพิ่มเติม"</string>
<string name="menu_copy" msgid="6108677035381940698">"คัดลอก"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"แสดงสายที่โทรออกเท่านั้น"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"ไม่มีข้อความเสียงล่าสุด"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"แสดงรายชื่อในสมุดโทรศัพท์ทั้งหมด"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"แสดงเฉพาะรายชื่อที่ชื่นชอบ"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"ประวัติ"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 75bdfd4..127b094 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"mag-dial"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"numerong ida-dial"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Kasaysayan ng Tawag"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Higit pang mga pagpipilian"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopyahin"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Ipakita lang ang papalabas"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Walang mga kamakailang voicemail."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Ipakita ang lahat ng contact"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Mga paborito lang ang ipakita"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Kasaysayan"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index abbdc3e..ed49499 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"çevir"</string>
<string name="description_delete_button" msgid="6263102114033407382">"geri tuşu"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"çevrilecek numara"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Diğer seçenekler"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopyala"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Yalnızca gidenleri göster"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Yakın zamanda bırakılan sesli mesaj yok."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Tüm kişileri göster"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Yalnızca favori kişileri göster"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Geçmiş"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index ddb623e..2e37861 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"дзвон."</string>
<string name="description_delete_button" msgid="6263102114033407382">"видалити"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"номер для набору"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Історія викликів"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Інші варіанти"</string>
<string name="menu_copy" msgid="6108677035381940698">"Копіювати"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Показувати лише вихідні"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 74d4a9d..1ed85d0 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"quay số"</string>
<string name="description_delete_button" msgid="6263102114033407382">"backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"số để quay"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Tùy chọn khác"</string>
<string name="menu_copy" msgid="6108677035381940698">"Sao chép"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Chỉ hiển thị cuộc gọi đi"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"Không có thư thoại gần đây nào."</string>
<string name="show_all_contacts" msgid="1732256558071778056">"Hiển thị tất cả liên hệ"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"Chỉ hiển thị liên hệ ưa thích"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"Lịch sử"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index eb7d201..5ff5079 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -82,6 +82,8 @@
<string name="description_dial_button" msgid="1274091017188142646">"拨打"</string>
<string name="description_delete_button" msgid="6263102114033407382">"退格"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"要拨打的号码"</string>
+ <!-- no translation found for action_menu_call_history_description (9018442816219748968) -->
+ <skip />
<string name="action_menu_overflow_description" msgid="2303272250613084574">"更多选项"</string>
<string name="menu_copy" msgid="6108677035381940698">"复制"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"仅显示外拨电话"</string>
@@ -138,6 +140,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"最近没有语音邮件。"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"显示所有联系人"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"仅显示常用联系人"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"通话记录"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 4bade3b..4dc626d 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"撥號"</string>
<string name="description_delete_button" msgid="6263102114033407382">"Backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"撥號號碼"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"通話紀錄"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"更多選項"</string>
<string name="menu_copy" msgid="6108677035381940698">"複製"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"僅顯示撥出電話"</string>
@@ -138,6 +139,5 @@
<string name="recentVoicemails_empty" msgid="5163114119598014048">"最近沒有語音留言。"</string>
<string name="show_all_contacts" msgid="1732256558071778056">"顯示所有聯絡人"</string>
<string name="show_favorites_only" msgid="5520072531022614595">"只顯示我的最愛"</string>
- <!-- no translation found for call_log_activity_title (4612824396355272023) -->
- <skip />
+ <string name="call_log_activity_title" msgid="4612824396355272023">"通話紀錄"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index a651ae1..b6c5498 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -82,6 +82,7 @@
<string name="description_dial_button" msgid="1274091017188142646">"dayela"</string>
<string name="description_delete_button" msgid="6263102114033407382">"i-backspace"</string>
<string name="description_digits_edittext" msgid="8760207516497016437">"inombolo okumele uyidayele"</string>
+ <string name="action_menu_call_history_description" msgid="9018442816219748968">"Umlando wekholi"</string>
<string name="action_menu_overflow_description" msgid="2303272250613084574">"Izinketho eziningi"</string>
<string name="menu_copy" msgid="6108677035381940698">"Kopisha"</string>
<string name="menu_show_outgoing_only" msgid="1965570298133301970">"Bonisa eziphumayo kuphela"</string>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index c35ea39..2fc78b8 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -54,10 +54,9 @@
<color name="background_dialpad">#ee020709</color>
<!-- Primary color of dialpad text, including the call button -->
- <color name="dialpad_primary_text_color">#0099cc</color>
- <!-- Secondary color of dialpad text (mainly used for the letters corresponding to each digit
- -->
- <color name="dialpad_secondary_text_color">#888888</color>
+ <color name="dialpad_primary_text_color">#33b5e5</color>
+ <!-- Secondary color of dialpad text (used for the letters corresponding to each digit -->
+ <color name="dialpad_secondary_text_color">#aaaaaa</color>
<!-- Background color of action bars -->
<color name="actionbar_background_color">#e6e6e6</color>
@@ -70,4 +69,6 @@
<!-- Text color of the search box -->
<color name="searchbox_text_color">#d3d3d3</color>
+ <!-- Color of the contact name in favorite tiles -->
+ <color name="contact_tile_name_color">#f0f0f0</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index e9f2ce0..7b4c65e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -34,7 +34,7 @@
<dimen name="call_log_call_action_width">48dip</dimen>
<dimen name="call_log_icon_margin">4dip</dimen>
<dimen name="call_log_inner_margin">8dip</dimen>
- <dimen name="call_log_outer_margin">16dip</dimen>
+ <dimen name="call_log_outer_margin">8dip</dimen>
<dimen name="call_log_indent_margin">24dip</dimen>
<dimen name="call_log_list_item_height">56dip</dimen>
<dimen name="call_log_list_contact_photo_size">64dip</dimen>
@@ -49,6 +49,11 @@
<integer name="dialpad_layout_weight_dialpad">65</integer>
<integer name="dialpad_layout_weight_additional_buttons">15</integer>
+ <!-- Text dimensions for dialpad keys -->
+ <dimen name="dialpad_key_numbers_size">40dp</dimen>
+ <dimen name="dialpad_key_letters_size">11dp</dimen>
+ <dimen name="dialpad_key_special_characters_size">25dp</dimen>
+
<dimen name="fake_action_bar_height">48dp</dimen>
<!-- Min with of fake menu buttons, which should be same as ActionBar's one -->
<dimen name="fake_menu_button_min_width">56dp</dimen>
@@ -59,7 +64,8 @@
<dimen name="smartdial_confidence_hint_text_size">27dp</dimen>
<!-- Favorites tile and recent call log padding -->
- <dimen name="phone_contact_tile_divider_padding">3dp</dimen>
+ <dimen name="contact_tile_divider_padding">3dp</dimen>
+ <dimen name="contact_tile_info_button_height_and_width">36dp</dimen>
<dimen name="favorites_row_top_padding">8dp</dimen>
<dimen name="favorites_row_bottom_padding">8dp</dimen>
<dimen name="favorites_row_start_padding">8dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c7e1b86..307d56b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -452,6 +452,9 @@
-->
<string name="description_call_log_unheard_voicemail">Unheard voicemail</string>
+ <!-- String describing the icon used to start a voice search -->
+ <string name="description_start_voice_search">Start voice search</string>
+
<!-- The string used to represent an unknown location for a phone number in the call log [CHAR LIMIT=3] -->
<string name="call_log_empty_gecode">-</string>
@@ -527,6 +530,14 @@
[CHAR LIMIT=15] -->
<string name="call_log_missed_title">Missed</string>
+ <!-- String resource for the font-family to use for the call log activity's title
+ Do not translate. -->
+ <string name="call_log_activity_title_font_family">sans-serif-light</string>
+
+ <!-- String resource for the font-family to use for show all contacts' title
+ Do not translate. -->
+ <string name="show_all_contacts_title_font_family">sans-serif-light</string>
+
<!-- Text displayed when the list of missed calls is empty -->
<string name="recentMissed_empty">No recent missed calls.</string>
@@ -541,4 +552,62 @@
<!-- Title of activity that displays a list of all calls -->
<string name="call_log_activity_title">History</string>
+
+ <!-- Do not translate. -->
+ <string name="dialpad_0_number">0</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_0_letters">+</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_1_number">1</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_1_letters"></string>
+ <!-- Do not translate. -->
+ <string name="dialpad_2_number">2</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_2_letters">ABC</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_3_number">3</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_3_letters">DEF</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_4_number">4</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_4_letters">GHI</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_5_number">5</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_5_letters">JKL</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_6_number">6</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_6_letters">MNO</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_7_number">7</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_7_letters">PQRS</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_8_number">8</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_8_letters">TUV</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_9_number">9</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_9_letters">WXYZ</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_star_number">*</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_star_letters"></string>
+ <!-- Do not translate. -->
+ <string name="dialpad_pound_number">#</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_pound_letters"></string>
+
+ <!-- Title of fragment that displays all contacts -->
+ <string name="show_all_contacts_title">All contacts</string>
+ <!-- Title of show all contacts button -->
+ <string name="show_all_contacts_button_text">All contacts</string>
+ <!-- Text displayed when user swipes out a favorite contact -->
+ <string name="favorite_hidden">Hidden from favorites</string>
+ <!-- Text displayed for the undo button to undo removing a favorite contact -->
+ <string name="favorite_hidden_undo">Undo</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 02b693c..0805dd8 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -92,11 +92,11 @@
<item name="list_item_profile_photo_size">70dip</item>
<item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item>
<item name="list_item_header_text_indent">8dip</item>
- <item name="list_item_header_text_color">@color/people_app_theme_color</item>
- <item name="list_item_header_text_size">14sp</item>
- <item name="list_item_header_height">24dip</item>
- <item name="list_item_header_underline_height">1dip</item>
- <item name="list_item_header_underline_color">@color/people_app_theme_color</item>
+ <item name="list_item_header_text_color">@color/dialtacts_secondary_text_color</item>
+ <item name="list_item_header_text_size">20sp</item>
+ <item name="list_item_header_height">48dip</item>
+ <item name="list_item_header_underline_height">2dip</item>
+ <item name="list_item_header_underline_color">@color/favorite_contacts_separator_color</item>
<item name="list_item_data_width_weight">5</item>
<item name="list_item_label_width_weight">3</item>
<item name="contact_browser_list_padding_left">8dip</item>
diff --git a/src/com/android/dialer/NewDialtactsActivity.java b/src/com/android/dialer/NewDialtactsActivity.java
index 0229c6b..7ac1b6e 100644
--- a/src/com/android/dialer/NewDialtactsActivity.java
+++ b/src/com/android/dialer/NewDialtactsActivity.java
@@ -38,6 +38,8 @@
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents.UI;
import android.provider.Settings;
+import android.speech.RecognizerIntent;
+import android.support.v4.app.NavUtils;
import android.telephony.TelephonyManager;
import android.text.Editable;
import android.text.TextUtils;
@@ -71,9 +73,12 @@
import com.android.dialer.interactions.PhoneNumberInteraction;
import com.android.dialer.list.NewPhoneFavoriteFragment;
import com.android.dialer.list.OnListFragmentScrolledListener;
+import com.android.dialer.list.ShowAllContactsFragment;
import com.android.dialer.list.SmartDialSearchFragment;
import com.android.internal.telephony.ITelephony;
+import java.util.ArrayList;
+
/**
* The dialer tab's title is 'phone', a more common name (see strings.xml).
*
@@ -93,7 +98,6 @@
private static final String PHONE_PACKAGE = "com.android.phone";
private static final String CALL_SETTINGS_CLASS_NAME =
"com.android.phone.CallFeaturesSetting";
-
/** @see #getCallOrigin() */
private static final String CALL_ORIGIN_DIALTACTS =
"com.android.dialer.DialtactsActivity";
@@ -102,6 +106,7 @@
private static final String TAG_REGULAR_SEARCH_FRAGMENT = "search";
private static final String TAG_SMARTDIAL_SEARCH_FRAGMENT = "smartdial";
private static final String TAG_FAVORITES_FRAGMENT = "favorites";
+ private static final String TAG_SHOW_ALL_CONTACTS_FRAGMENT = "show_all_contacts";
/**
* Just for backward compatibility. Should behave as same as {@link Intent#ACTION_DIAL}.
@@ -110,6 +115,8 @@
private static final int SUBACTIVITY_ACCOUNT_FILTER = 1;
+ private static final int ACTIVITY_REQUEST_CODE_VOICE_SEARCH = 1;
+
private String mFilterText;
/**
@@ -132,6 +139,8 @@
*/
private SmartDialSearchFragment mSmartDialSearchFragment;
+ private ShowAllContactsFragment mShowAllContactsFragment;
+
private View mMenuButton;
private View mCallHistoryButton;
private View mDialpadButton;
@@ -146,6 +155,7 @@
private boolean mInSearchUi;
private View mSearchViewContainer;
private View mSearchViewCloseButton;
+ private View mVoiceSearchButton;
private EditText mSearchView;
/**
@@ -183,7 +193,13 @@
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- final boolean smartDialSearch = isDialpadShowing();
+ // TODO krelease: populate the search fragments with the correct
+ // search query at the correct point in time of the fragment lifecycle.
+ // The current behavior is to simply return to the favorites screen
+ // (when docked), or returning to the Dialer after it has been
+ // swapped out of memory.
+ if (mDialpadFragment == null) return;
+ final boolean smartDialSearch = isDialpadShowing();
final String newText = s.toString();
// Show search result with non-empty text. Show a bare list otherwise.
if (TextUtils.isEmpty(newText) && mInSearchUi) {
@@ -194,7 +210,7 @@
enterSearchUi(smartDialSearch);
}
- if (isDialpadShowing()) {
+ if (smartDialSearch) {
mSmartDialSearchFragment.setQueryString(newText, false);
} else {
mRegularSearchFragment.setQueryString(newText, false);
@@ -209,7 +225,7 @@
};
private boolean isDialpadShowing() {
- return mDialpadFragment.isVisible();
+ return mDialpadFragment != null && mDialpadFragment.isVisible();
}
@Override
@@ -223,23 +239,26 @@
getActionBar().hide();
- mPhoneFavoriteFragment = new NewPhoneFavoriteFragment();
- mPhoneFavoriteFragment.setListener(mPhoneFavoriteListener);
+ if (savedInstanceState == null) {
+ mPhoneFavoriteFragment = new NewPhoneFavoriteFragment();
+ mPhoneFavoriteFragment.setListener(mPhoneFavoriteListener);
- mRegularSearchFragment = new NewSearchFragment();
- mSmartDialSearchFragment = new SmartDialSearchFragment();
- mDialpadFragment = new NewDialpadFragment();
+ mRegularSearchFragment = new NewSearchFragment();
+ mSmartDialSearchFragment = new SmartDialSearchFragment();
+ mDialpadFragment = new NewDialpadFragment();
+ mShowAllContactsFragment = new ShowAllContactsFragment();
+ mShowAllContactsFragment.setOnPhoneNumberPickerActionListener(
+ mPhoneNumberPickerActionListener);
- // TODO krelease: load fragments on demand instead of creating all of them at run time
- final FragmentTransaction ft = getFragmentManager().beginTransaction();
- ft.add(R.id.dialtacts_frame, mPhoneFavoriteFragment, TAG_FAVORITES_FRAGMENT);
- ft.add(R.id.dialtacts_frame, mRegularSearchFragment, TAG_REGULAR_SEARCH_FRAGMENT);
- ft.add(R.id.dialtacts_frame, mSmartDialSearchFragment, TAG_SMARTDIAL_SEARCH_FRAGMENT);
- ft.add(R.id.dialtacts_container, mDialpadFragment, TAG_DIALPAD_FRAGMENT);
- ft.hide(mRegularSearchFragment);
- ft.hide(mDialpadFragment);
- ft.hide(mSmartDialSearchFragment);
- ft.commit();
+ // TODO krelease: load fragments on demand instead of creating all of them at run time
+ final FragmentTransaction ft = getFragmentManager().beginTransaction();
+ ft.add(R.id.dialtacts_frame, mPhoneFavoriteFragment, TAG_FAVORITES_FRAGMENT);
+ ft.add(R.id.dialtacts_frame, mRegularSearchFragment, TAG_REGULAR_SEARCH_FRAGMENT);
+ ft.add(R.id.dialtacts_frame, mSmartDialSearchFragment, TAG_SMARTDIAL_SEARCH_FRAGMENT);
+ ft.add(R.id.dialtacts_frame, mShowAllContactsFragment, TAG_SHOW_ALL_CONTACTS_FRAGMENT);
+ ft.add(R.id.dialtacts_container, mDialpadFragment, TAG_DIALPAD_FRAGMENT);
+ ft.commit();
+ }
mBottomPaddingView = findViewById(R.id.dialtacts_bottom_padding);
prepareSearchView();
@@ -264,21 +283,39 @@
TAG_REGULAR_SEARCH_FRAGMENT);
mRegularSearchFragment.setOnPhoneNumberPickerActionListener(
mPhoneNumberPickerActionListener);
- if (!mRegularSearchFragment.isHidden()) {
- final FragmentTransaction transaction = getFragmentManager().beginTransaction();
- transaction.hide(mRegularSearchFragment);
- transaction.commit();
- }
mSmartDialSearchFragment = (SmartDialSearchFragment) fm.findFragmentByTag(
TAG_SMARTDIAL_SEARCH_FRAGMENT);
mSmartDialSearchFragment.setOnPhoneNumberPickerActionListener(
mPhoneNumberPickerActionListener);
- if (!mSmartDialSearchFragment.isHidden()) {
+
+ mShowAllContactsFragment = (ShowAllContactsFragment) fm.findFragmentByTag(
+ TAG_SHOW_ALL_CONTACTS_FRAGMENT);
+ mShowAllContactsFragment.setOnPhoneNumberPickerActionListener(
+ mPhoneNumberPickerActionListener);
+ }
+
+ @Override
+ public void onAttachFragment(Fragment fragment) {
+ if (fragment instanceof NewDialpadFragment || fragment instanceof NewSearchFragment
+ || fragment instanceof SmartDialSearchFragment
+ || fragment instanceof ShowAllContactsFragment) {
final FragmentTransaction transaction = getFragmentManager().beginTransaction();
- transaction.hide(mSmartDialSearchFragment);
+ transaction.hide(fragment);
transaction.commit();
}
+ // TODO krelease: Save some kind of state here to show the appropriate fragment
+ // based on the state of the dialer when it was last paused
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ // Respond to the action bar's Up/Home button
+ case android.R.id.home:
+ hideAllContactsFragment();
+ }
+ return super.onOptionsItemSelected(item);
}
@Override
@@ -299,7 +336,8 @@
try {
startActivity(new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI));
} catch (ActivityNotFoundException e) {
- Toast toast = Toast.makeText(this, R.string.add_contact_not_available,
+ Toast toast = Toast.makeText(this,
+ R.string.add_contact_not_available,
Toast.LENGTH_SHORT);
toast.show();
}
@@ -314,7 +352,6 @@
@Override
public void onClick(View view) {
switch (view.getId()) {
- case R.id.overflow_menu_on_dialpad:
case R.id.overflow_menu: {
final PopupMenu popupMenu = new PopupMenu(NewDialtactsActivity.this, view);
final Menu menu = popupMenu.getMenu();
@@ -340,6 +377,10 @@
mSearchView.setText("");
}
break;
+ case R.id.voice_search_button:
+ final Intent voiceIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
+ startActivityForResult(voiceIntent, ACTIVITY_REQUEST_CODE_VOICE_SEARCH);
+ break;
default: {
Log.wtf(TAG, "Unexpected onClick event from " + view);
break;
@@ -347,6 +388,25 @@
}
}
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == ACTIVITY_REQUEST_CODE_VOICE_SEARCH) {
+ if (resultCode == RESULT_OK) {
+ final ArrayList<String> matches = data.getStringArrayListExtra(
+ RecognizerIntent.EXTRA_RESULTS);
+ if (matches.size() > 0) {
+ final String match = matches.get(0);
+ mSearchView.setText(match);
+ } else {
+ Log.e(TAG, "Voice search - nothing heard");
+ }
+ } else {
+ Log.e(TAG, "Voice search failed");
+ }
+ }
+ super.onActivityResult(requestCode, resultCode, data);
+ }
+
private void showDialpadFragment(boolean animate) {
final FragmentTransaction ft = getFragmentManager().beginTransaction();
if (animate) {
@@ -365,11 +425,29 @@
ft.commit();
}
+ public void showAllContactsFragment() {
+ final FragmentTransaction ft = getFragmentManager().beginTransaction();
+ ft.hide(mPhoneFavoriteFragment);
+ ft.show(mShowAllContactsFragment);
+ // TODO{klp} Add animation
+ ft.commit();
+ hideSearchBar(false);
+ }
+
+ private void hideAllContactsFragment() {
+ final FragmentTransaction ft = getFragmentManager().beginTransaction();
+ ft.hide(mShowAllContactsFragment);
+ ft.show(mPhoneFavoriteFragment);
+ ft.commit();
+ showSearchBar();
+ }
+
private void prepareSearchView() {
mSearchViewContainer = findViewById(R.id.search_view_container);
mSearchViewCloseButton = findViewById(R.id.search_close_button);
- mSearchViewCloseButton.setClickable(true);
mSearchViewCloseButton.setOnClickListener(this);
+ mVoiceSearchButton = findViewById(R.id.voice_search_button);
+ mVoiceSearchButton.setOnClickListener(this);
mSearchView = (EditText) findViewById(R.id.search_view);
mSearchView.addTextChangedListener(mPhoneSearchQueryTextListener);
mSearchView.setHint(getString(R.string.dialer_hint_find_contact));
@@ -397,43 +475,56 @@
};
public void hideSearchBar() {
- mSearchViewContainer.animate().cancel();
- mSearchViewContainer.setAlpha(1);
- mSearchViewContainer.setTranslationY(0);
- mSearchViewContainer.animate().withLayer().alpha(0).translationY(-mSearchView.getHeight())
- .setDuration(200).setListener(mHideListener);
+ hideSearchBar(true);
+ }
- mPhoneFavoriteFragment.getView().animate().withLayer()
- .translationY(-mSearchViewContainer.getHeight()).setDuration(200).setListener(
+ public void hideSearchBar(boolean shiftView) {
+ if (shiftView) {
+ mSearchViewContainer.animate().cancel();
+ mSearchViewContainer.setAlpha(1);
+ mSearchViewContainer.setTranslationY(0);
+ mSearchViewContainer.animate().withLayer().alpha(0).translationY(-mSearchView.getHeight())
+ .setDuration(200).setListener(mHideListener);
+
+ mPhoneFavoriteFragment.getView().animate().withLayer()
+ .translationY(-mSearchViewContainer.getHeight()).setDuration(200).setListener(
new AnimatorListenerAdapter() {
- @Override
+ @Override
public void onAnimationEnd(Animator animation) {
mBottomPaddingView.setVisibility(View.VISIBLE);
mPhoneFavoriteFragment.getView().setTranslationY(0);
}
});
+ } else {
+ mSearchViewContainer.setTranslationY(-mSearchView.getHeight());
+ }
}
public void showSearchBar() {
+ // If the favorites fragment hasn't been fully created before the dialpad fragment
+ // is hidden (i.e. onResume), don't bother animating
+ if (mPhoneFavoriteFragment == null || mPhoneFavoriteFragment.getView() == null) {
+ return;
+ }
mSearchViewContainer.animate().cancel();
mSearchViewContainer.setAlpha(0);
mSearchViewContainer.setTranslationY(-mSearchViewContainer.getHeight());
mSearchViewContainer.animate().withLayer().alpha(1).translationY(0).setDuration(200)
.setListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
+ @Override
+ public void onAnimationStart(Animator animation) {
mSearchViewContainer.setVisibility(View.VISIBLE);
- }
+ }
});
mPhoneFavoriteFragment.getView().setTranslationY(-mSearchViewContainer.getHeight());
mPhoneFavoriteFragment.getView().animate().withLayer().translationY(0).setDuration(200)
.setListener(
new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- mBottomPaddingView.setVisibility(View.GONE);
- }
+ @Override
+ public void onAnimationStart(Animator animation) {
+ mBottomPaddingView.setVisibility(View.GONE);
+ }
});
}
@@ -441,13 +532,7 @@
public void setupFakeActionBarItemsForFavoritesFragment() {
mMenuButton = findViewById(R.id.overflow_menu);
if (mMenuButton != null) {
- // mMenuButton.setMinimumWidth(fakeMenuItemWidth);
- if (ViewConfiguration.get(this).hasPermanentMenuKey()) {
- // This is required for dialpad button's layout, so must not use GONE here.
- mMenuButton.setVisibility(View.INVISIBLE);
- } else {
- mMenuButton.setOnClickListener(this);
- }
+ mMenuButton.setOnClickListener(this);
}
mCallHistoryButton = findViewById(R.id.call_history_button);
@@ -460,8 +545,6 @@
}
public void setupFakeActionBarItemsForDialpadFragment() {
- final View overflowButton = findViewById(R.id.overflow_menu_on_dialpad);
- overflowButton.setOnClickListener(this);
final View callhistoryButton = findViewById(R.id.call_history_on_dialpad_button);
callhistoryButton.setOnClickListener(this);
}
@@ -705,6 +788,8 @@
hideDialpadFragment(true);
} else if (mInSearchUi) {
mSearchView.setText(null);
+ } else if (mShowAllContactsFragment.isVisible()) {
+ hideAllContactsFragment();
} else if (isTaskRoot()) {
// Instead of stopping, simply push this to the back of the stack.
// This is only done when running at the top of the stack;
diff --git a/src/com/android/dialer/calllog/NewCallLogActivity.java b/src/com/android/dialer/calllog/NewCallLogActivity.java
index a25729a..d8724cf 100644
--- a/src/com/android/dialer/calllog/NewCallLogActivity.java
+++ b/src/com/android/dialer/calllog/NewCallLogActivity.java
@@ -29,6 +29,9 @@
import android.support.v4.view.PagerTabStrip;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.TypefaceSpan;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -119,6 +122,11 @@
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowTitleEnabled(true);
+ final SpannableString s = new SpannableString(getString(R.string.call_log_activity_title));
+ s.setSpan(new TypefaceSpan(getString(R.string.call_log_activity_title_font_family)), 0,
+ s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ actionBar.setTitle(s);
+
final Tab allTab = actionBar.newTab();
final String allTitle = getString(R.string.call_log_all_title);
allTab.setContentDescription(allTitle);
diff --git a/src/com/android/dialer/dialpad/DialpadKeyButton.java b/src/com/android/dialer/dialpad/DialpadKeyButton.java
new file mode 100644
index 0000000..9aae631
--- /dev/null
+++ b/src/com/android/dialer/dialpad/DialpadKeyButton.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+package com.android.dialer.dialpad;
+
+import android.content.Context;
+import android.graphics.Rect;
+import android.os.Bundle;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.RelativeLayout;
+
+/**
+ * Custom class for dialpad buttons.
+ * <p>
+ * This class implements lift-to-type interaction when touch exploration is
+ * enabled.
+ */
+public class DialpadKeyButton extends RelativeLayout {
+ /** Accessibility manager instance used to check touch exploration state. */
+ private AccessibilityManager mAccessibilityManager;
+
+ /** Bounds used to filter HOVER_EXIT events. */
+ private Rect mHoverBounds = new Rect();
+
+ public interface OnPressedListener {
+ public void onPressed(View view, boolean pressed);
+ }
+
+ private OnPressedListener mOnPressedListener;
+
+ public void setOnPressedListener(OnPressedListener onPressedListener) {
+ mOnPressedListener = onPressedListener;
+ }
+
+ public DialpadKeyButton(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ initForAccessibility(context);
+ }
+
+ public DialpadKeyButton(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ initForAccessibility(context);
+ }
+
+ private void initForAccessibility(Context context) {
+ mAccessibilityManager = (AccessibilityManager) context.getSystemService(
+ Context.ACCESSIBILITY_SERVICE);
+ }
+
+ @Override
+ public void setPressed(boolean pressed) {
+ super.setPressed(pressed);
+ if (mOnPressedListener != null) {
+ mOnPressedListener.onPressed(this, pressed);
+ }
+ }
+
+ @Override
+ public void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+
+ mHoverBounds.left = getPaddingLeft();
+ mHoverBounds.right = w - getPaddingRight();
+ mHoverBounds.top = getPaddingTop();
+ mHoverBounds.bottom = h - getPaddingBottom();
+ }
+
+ @Override
+ public boolean performAccessibilityAction(int action, Bundle arguments) {
+ if (action == AccessibilityNodeInfo.ACTION_CLICK) {
+ simulateClickForAccessibility();
+ return true;
+ }
+
+ return super.performAccessibilityAction(action, arguments);
+ }
+
+ @Override
+ public boolean onHoverEvent(MotionEvent event) {
+ // When touch exploration is turned on, lifting a finger while inside
+ // the button's hover target bounds should perform a click action.
+ if (mAccessibilityManager.isEnabled()
+ && mAccessibilityManager.isTouchExplorationEnabled()) {
+ switch (event.getActionMasked()) {
+ case MotionEvent.ACTION_HOVER_ENTER:
+ // Lift-to-type temporarily disables double-tap activation.
+ setClickable(false);
+ break;
+ case MotionEvent.ACTION_HOVER_EXIT:
+ if (mHoverBounds.contains((int) event.getX(), (int) event.getY())) {
+ simulateClickForAccessibility();
+ }
+ setClickable(true);
+ break;
+ }
+ }
+
+ return super.onHoverEvent(event);
+ }
+
+ /**
+ * When accessibility is on, simulate press and release to preserve the
+ * semantic meaning of performClick(). Required for Braille support.
+ */
+ private void simulateClickForAccessibility() {
+ // Checking the press state prevents double activation.
+ if (isPressed()) {
+ return;
+ }
+
+ setPressed(true);
+
+ // Stay consistent with performClick() by sending the event after
+ // setting the pressed state but before performing the action.
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
+
+ setPressed(false);
+ }
+}
diff --git a/src/com/android/dialer/dialpad/NewDialpadFragment.java b/src/com/android/dialer/dialpad/NewDialpadFragment.java
index 15627c7..7eb7c0f 100644
--- a/src/com/android/dialer/dialpad/NewDialpadFragment.java
+++ b/src/com/android/dialer/dialpad/NewDialpadFragment.java
@@ -69,6 +69,7 @@
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupMenu;
+import android.widget.TableRow;
import android.widget.TextView;
import com.android.contacts.common.CallUtil;
@@ -98,7 +99,7 @@
View.OnLongClickListener, View.OnKeyListener,
AdapterView.OnItemClickListener, TextWatcher,
PopupMenu.OnMenuItemClickListener,
- DialpadImageButton.OnPressedListener {
+ DialpadKeyButton.OnPressedListener {
private static final String TAG = NewDialpadFragment.class.getSimpleName();
public interface OnDialpadFragmentStartedListener {
@@ -425,6 +426,9 @@
throw new ClassCastException(activity.toString()
+ " must implement OnDialpadFragmentStartedListener");
}
+
+ final View overflowButton = getView().findViewById(R.id.overflow_menu_on_dialpad);
+ overflowButton.setOnClickListener(this);
}
private boolean isLayoutReady() {
@@ -577,10 +581,36 @@
}
private void setupKeypad(View fragmentView) {
- int[] buttonIds = new int[] { R.id.one, R.id.two, R.id.three, R.id.four, R.id.five,
- R.id.six, R.id.seven, R.id.eight, R.id.nine, R.id.zero, R.id.star, R.id.pound};
- for (int id : buttonIds) {
- ((DialpadImageButton) fragmentView.findViewById(id)).setOnPressedListener(this);
+ final int[] buttonIds = new int[] {R.id.zero, R.id.one, R.id.two, R.id.three, R.id.four,
+ R.id.five, R.id.six, R.id.seven, R.id.eight, R.id.nine, R.id.star, R.id.pound};
+
+ final int[] numberIds = new int[] {R.string.dialpad_0_number, R.string.dialpad_1_number,
+ R.string.dialpad_2_number, R.string.dialpad_3_number, R.string.dialpad_4_number,
+ R.string.dialpad_5_number, R.string.dialpad_6_number, R.string.dialpad_7_number,
+ R.string.dialpad_8_number, R.string.dialpad_9_number, R.string.dialpad_star_number,
+ R.string.dialpad_pound_number};
+
+ final int[] letterIds = new int[] {R.string.dialpad_0_letters, R.string.dialpad_1_letters,
+ R.string.dialpad_2_letters, R.string.dialpad_3_letters, R.string.dialpad_4_letters,
+ R.string.dialpad_5_letters, R.string.dialpad_6_letters, R.string.dialpad_7_letters,
+ R.string.dialpad_8_letters, R.string.dialpad_9_letters,
+ R.string.dialpad_star_letters, R.string.dialpad_pound_letters};
+
+ DialpadKeyButton dialpadKey;
+ TextView numberView;
+ TextView lettersView;
+ final Resources resources = getResources();
+ for (int i = 0; i < buttonIds.length; i++) {
+ dialpadKey = (DialpadKeyButton) fragmentView.findViewById(buttonIds[i]);
+ dialpadKey.setLayoutParams(new TableRow.LayoutParams(
+ TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT));
+ dialpadKey.setOnPressedListener(this);
+ numberView = (TextView) dialpadKey.findViewById(R.id.dialpad_key_number);
+ lettersView = (TextView) dialpadKey.findViewById(R.id.dialpad_key_letters);
+ numberView.setText(resources.getString(numberIds[i]));
+ if (lettersView != null) {
+ lettersView.setText(resources.getString(letterIds[i]));
+ }
}
// Long-pressing one button will initiate Voicemail.
@@ -726,24 +756,8 @@
}
private void setupMenuItems(Menu menu) {
- final MenuItem callSettingsMenuItem = menu.findItem(R.id.menu_call_settings_dialpad);
final MenuItem addToContactMenuItem = menu.findItem(R.id.menu_add_contacts);
- // Check if all the menu items are inflated correctly. As a shortcut, we assume all menu
- // items are ready if the first item is non-null.
- if (callSettingsMenuItem == null) {
- return;
- }
-
- final Activity activity = getActivity();
- if (activity != null && ViewConfiguration.get(activity).hasPermanentMenuKey()) {
- // Call settings should be available via its parent Activity.
- callSettingsMenuItem.setVisible(false);
- } else {
- callSettingsMenuItem.setVisible(true);
- callSettingsMenuItem.setIntent(DialtactsActivity.getCallSettingsIntent());
- }
-
// We show "add to contacts" menu only when the user is
// seeing usual dialpad and has typed at least one digit.
// We never show a menu if the "choose dialpad" UI is up.
@@ -751,7 +765,6 @@
addToContactMenuItem.setVisible(false);
} else {
final CharSequence digits = mDigits.getText();
-
// Put the current digits string into an intent
addToContactMenuItem.setIntent(getAddToContactIntent(digits));
addToContactMenuItem.setVisible(true);
@@ -917,6 +930,15 @@
@Override
public void onClick(View view) {
switch (view.getId()) {
+ case R.id.overflow_menu_on_dialpad: {
+ final PopupMenu popupMenu = new PopupMenu(getActivity(), view);
+ final Menu menu = popupMenu.getMenu();
+ popupMenu.inflate(R.menu.dialpad_options_new);
+ popupMenu.setOnMenuItemClickListener(this);
+ setupMenuItems(menu);
+ popupMenu.show();
+ break;
+ }
case R.id.deleteButton: {
keyPressed(KeyEvent.KEYCODE_DEL);
return;
@@ -939,19 +961,6 @@
}
}
- public PopupMenu constructPopupMenu(View anchorView) {
- final Context context = getActivity();
- if (context == null) {
- return null;
- }
- final PopupMenu popupMenu = new PopupMenu(context, anchorView);
- final Menu menu = popupMenu.getMenu();
- popupMenu.inflate(R.menu.dialpad_options);
- popupMenu.setOnMenuItemClickListener(this);
- setupMenuItems(menu);
- return popupMenu;
- }
-
@Override
public boolean onLongClick(View view) {
final Editable digits = mDigits.getText();
@@ -1496,13 +1505,22 @@
@Override
public boolean onMenuItemClick(MenuItem item) {
- return onOptionsItemSelected(item);
+ // R.id.menu_add_contacts already has an add to contact intent populated by setupMenuItems
+ switch (item.getItemId()) {
+ case R.id.menu_2s_pause:
+ updateDialString(PAUSE);
+ return true;
+ case R.id.menu_add_wait:
+ updateDialString(WAIT);
+ return true;
+ default:
+ return false;
+ }
}
/**
* Updates the dial string (mDigits) after inserting a Pause character (,)
* or Wait character (;).
- * TODO krelease: add new dialpad buttons to add PAUSE and WAIT characters
*/
private void updateDialString(char newDigit) {
if(newDigit != WAIT && newDigit != PAUSE) {
diff --git a/src/com/android/dialer/list/NewPhoneFavoriteFragment.java b/src/com/android/dialer/list/NewPhoneFavoriteFragment.java
index a181fb0..eba9310 100644
--- a/src/com/android/dialer/list/NewPhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/NewPhoneFavoriteFragment.java
@@ -19,18 +19,14 @@
import android.app.Fragment;
import android.app.LoaderManager;
import android.content.CursorLoader;
-import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.provider.ContactsContract.Directory;
-import android.provider.Settings;
import android.util.Log;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -44,10 +40,8 @@
import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.ContactTileLoaderFactory;
import com.android.contacts.common.GeoUtil;
-import com.android.contacts.common.list.ContactListItemView;
import com.android.contacts.common.list.ContactTileView;
import com.android.contacts.common.list.PhoneNumberListAdapter;
-import com.android.contacts.common.preference.ContactsPreferences;
import com.android.dialer.NewDialtactsActivity;
import com.android.dialer.R;
import com.android.dialer.calllog.ContactInfoHelper;
@@ -94,19 +88,6 @@
if (DEBUG) Log.d(TAG, "ContactTileLoaderListener#onLoadFinished");
mContactTileAdapter.setContactCursor(data);
- if (mAllContactsForceReload) {
- mAllContactsAdapter.onDataReload();
- // Use restartLoader() to make LoaderManager to load the section again.
- getLoaderManager().restartLoader(
- LOADER_ID_ALL_CONTACTS, null, mAllContactsLoaderListener);
- } else if (!mAllContactsLoaderStarted) {
- // Load "all" contacts if not loaded yet.
- getLoaderManager().initLoader(
- LOADER_ID_ALL_CONTACTS, null, mAllContactsLoaderListener);
- }
- mAllContactsForceReload = false;
- mAllContactsLoaderStarted = true;
-
// Show the filter header with "loading" state.
mAccountFilterHeader.setVisibility(View.VISIBLE);
}
@@ -117,29 +98,6 @@
}
}
- private class AllContactsLoaderListener implements LoaderManager.LoaderCallbacks<Cursor> {
- @Override
- public Loader<Cursor> onCreateLoader(int id, Bundle args) {
- if (DEBUG) Log.d(TAG, "AllContactsLoaderListener#onCreateLoader");
- CursorLoader loader = new CursorLoader(getActivity(), null, null, null, null, null);
- mAllContactsAdapter.configureLoader(loader, Directory.DEFAULT);
- return loader;
- }
-
- @Override
- public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
- if (DEBUG) Log.d(TAG, "AllContactsLoaderListener#onLoadFinished");
- mAllContactsAdapter.changeCursor(0, data);
- mHandler.removeMessages(MESSAGE_SHOW_LOADING_EFFECT);
- mLoadingView.setVisibility(View.VISIBLE);
- }
-
- @Override
- public void onLoaderReset(Loader<Cursor> loader) {
- if (DEBUG) Log.d(TAG, "AllContactsLoaderListener#onLoaderReset. ");
- }
- }
-
private class ContactTileAdapterListener implements ContactTileView.Listener {
@Override
public void onContactSelected(Uri contactUri, Rect targetRect) {
@@ -161,16 +119,6 @@
}
}
- private class ContactsPreferenceChangeListener
- implements ContactsPreferences.ChangeListener {
- @Override
- public void onChange() {
- if (loadContactsPreferences()) {
- requestReloadAllContacts();
- }
- }
- }
-
private class ScrollListener implements ListView.OnScrollListener {
@Override
public void onScroll(AbsListView view,
@@ -183,19 +131,6 @@
}
}
- private static final int MESSAGE_SHOW_LOADING_EFFECT = 1;
- private static final int LOADING_EFFECT_DELAY = 500; // ms
- private final Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MESSAGE_SHOW_LOADING_EFFECT:
- mLoadingView.setVisibility(View.VISIBLE);
- break;
- }
- }
- };
-
private Listener mListener;
private OnListFragmentScrolledListener mActivityScrollListener;
@@ -206,21 +141,9 @@
private NewCallLogAdapter mCallLogAdapter;
private CallLogQueryHandler mCallLogQueryHandler;
- /**
- * true when the loader for {@link PhoneNumberListAdapter} has started already.
- */
- private boolean mAllContactsLoaderStarted;
- /**
- * true when the loader for {@link PhoneNumberListAdapter} must reload "all" contacts again.
- * It typically happens when {@link ContactsPreferences} has changed its settings
- * (display order and sort order)
- */
- private boolean mAllContactsForceReload;
-
- private ContactsPreferences mContactsPrefs;
-
private TextView mEmptyView;
private ListView mListView;
+ private View mShowAllContactsButton;
/**
* Layout containing {@link #mAccountFilterHeader}. Used to limit area being "pressed".
*/
@@ -237,10 +160,6 @@
new ContactTileAdapterListener();
private final LoaderManager.LoaderCallbacks<Cursor> mContactTileLoaderListener =
new ContactTileLoaderListener();
- private final LoaderManager.LoaderCallbacks<Cursor> mAllContactsLoaderListener =
- new AllContactsLoaderListener();
- private final ContactsPreferenceChangeListener mContactsPreferenceChangeListener =
- new ContactsPreferenceChangeListener();
private final ScrollListener mScrollListener = new ScrollListener();
private boolean mOptionsMenuHasFrequents;
@@ -250,8 +169,6 @@
if (DEBUG) Log.d(TAG, "onAttach()");
super.onAttach(activity);
- mContactsPrefs = new ContactsPreferences(activity);
-
// Construct two base adapters which will become part of PhoneFavoriteMergedAdapter.
// We don't construct the resultant adapter at this moment since it requires LayoutInflater
// that will be available on onCreateView().
@@ -260,33 +177,6 @@
getResources().getInteger(R.integer.contact_tile_column_count_in_favorites_new),
1);
mContactTileAdapter.setPhotoLoader(ContactPhotoManager.getInstance(activity));
-
- // Setup the "all" adapter manually. See also the setup logic in ContactEntryListFragment.
- mAllContactsAdapter = new PhoneNumberListAdapter(activity);
- mAllContactsAdapter.setDisplayPhotos(true);
- mAllContactsAdapter.setQuickContactEnabled(true);
- mAllContactsAdapter.setSearchMode(false);
- mAllContactsAdapter.setIncludeProfile(false);
- mAllContactsAdapter.setSelectionVisible(false);
- mAllContactsAdapter.setDarkTheme(false);
- mAllContactsAdapter.setPhotoLoader(ContactPhotoManager.getInstance(activity));
- // Disable directory header.
- mAllContactsAdapter.setHasHeader(0, false);
- // Show A-Z section index.
- mAllContactsAdapter.setSectionHeaderDisplayEnabled(true);
- // Disable pinned header. It doesn't work with this fragment.
- mAllContactsAdapter.setPinnedPartitionHeadersEnabled(false);
- // Put photos on START (LEFT in LTR layout direction and RIGHT in RTL layout direction)
- // for consistency with "frequent" contacts section.
- mAllContactsAdapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(
- true /* opposite */ ));
-
- // Use Callable.CONTENT_URI which will include not only phone numbers but also SIP
- // addresses.
- mAllContactsAdapter.setUseCallableUri(true);
-
- mAllContactsAdapter.setContactNameDisplayOrder(mContactsPrefs.getDisplayOrder());
- mAllContactsAdapter.setSortOrder(mContactsPrefs.getSortOrder());
}
@Override
@@ -330,9 +220,18 @@
mAccountFilterHeaderContainer.addView(mAccountFilterHeader);
mLoadingView = inflater.inflate(R.layout.phone_loading_contacts, mListView, false);
+ mShowAllContactsButton = inflater.inflate(R.layout.show_all_contact_button, mListView,
+ false);
+ mShowAllContactsButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ showAllContacts();
+ }
+ });
- mAdapter = new NewPhoneFavoriteMergedAdapter(getActivity(),
- mContactTileAdapter, mAccountFilterHeaderContainer, mCallLogAdapter, mLoadingView);
+ mAdapter = new NewPhoneFavoriteMergedAdapter(getActivity(), mContactTileAdapter,
+ mAccountFilterHeaderContainer, mCallLogAdapter, mLoadingView,
+ mShowAllContactsButton);
mListView.setAdapter(mAdapter);
@@ -347,6 +246,7 @@
return listLayout;
}
+
// TODO krelease: update the options menu when displaying the popup menu instead. We could
// possibly get rid of this method entirely.
private boolean isOptionsMenuChanged() {
@@ -386,30 +286,11 @@
throw new ClassCastException(activity.toString()
+ " must implement OnListFragmentScrolledListener");
}
- mContactsPrefs.registerChangeListener(mContactsPreferenceChangeListener);
-
- // If ContactsPreferences has changed, we need to reload "all" contacts with the new
- // settings. If mAllContactsFoarceReload is already true, it should be kept.
- if (loadContactsPreferences()) {
- mAllContactsForceReload = true;
- }
// Use initLoader() instead of restartLoader() to refraining unnecessary reload.
// This method call implicitly assures ContactTileLoaderListener's onLoadFinished() will
// be called, on which we'll check if "all" contacts should be reloaded again or not.
getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, mContactTileLoaderListener);
-
- // Delay showing "loading" view until certain amount of time so that users won't see
- // instant flash of the view when the contacts load is fast enough.
- // This will be kept shown until both tile and all sections are loaded.
- mLoadingView.setVisibility(View.INVISIBLE);
- mHandler.sendEmptyMessageDelayed(MESSAGE_SHOW_LOADING_EFFECT, LOADING_EFFECT_DELAY);
- }
-
- @Override
- public void onStop() {
- super.onStop();
- mContactsPrefs.unregisterChangeListener();
}
/**
@@ -424,58 +305,17 @@
if (position <= contactTileAdapterCount) {
Log.e(TAG, "onItemClick() event for unexpected position. "
+ "The position " + position + " is before \"all\" section. Ignored.");
- } else {
- final int localPosition = position - mContactTileAdapter.getCount() - 1;
- if (mListener != null) {
- mListener.onContactSelected(mAllContactsAdapter.getDataUri(localPosition));
- }
}
}
- private boolean loadContactsPreferences() {
- if (mContactsPrefs == null || mAllContactsAdapter == null) {
- return false;
- }
-
- boolean changed = false;
- final int currentDisplayOrder = mContactsPrefs.getDisplayOrder();
- if (mAllContactsAdapter.getContactNameDisplayOrder() != currentDisplayOrder) {
- mAllContactsAdapter.setContactNameDisplayOrder(currentDisplayOrder);
- changed = true;
- }
-
- final int currentSortOrder = mContactsPrefs.getSortOrder();
- if (mAllContactsAdapter.getSortOrder() != currentSortOrder) {
- mAllContactsAdapter.setSortOrder(currentSortOrder);
- changed = true;
- }
-
- return changed;
- }
-
/**
- * Requests to reload "all" contacts. If the section is already loaded, this method will
- * force reloading it now. If the section isn't loaded yet, the actual load may be done later
- * (on {@link #onStart()}.
+ * Gets called when user click on the show all contacts button.
*/
- private void requestReloadAllContacts() {
- if (DEBUG) {
- Log.d(TAG, "requestReloadAllContacts()"
- + " mAllContactsAdapter: " + mAllContactsAdapter
- + ", mAllContactsLoaderStarted: " + mAllContactsLoaderStarted);
+ private void showAllContacts() {
+ // TODO {klp} Use interface for the fragment to communicate with the activity
+ if (getActivity() instanceof NewDialtactsActivity) {
+ ((NewDialtactsActivity) getActivity()).showAllContactsFragment();
}
-
- if (mAllContactsAdapter == null || !mAllContactsLoaderStarted) {
- // Remember this request until next load on onStart().
- mAllContactsForceReload = true;
- return;
- }
-
- if (DEBUG) Log.d(TAG, "Reload \"all\" contacts now.");
-
- mAllContactsAdapter.onDataReload();
- // Use restartLoader() to make LoaderManager to load the section again.
- getLoaderManager().restartLoader(LOADER_ID_ALL_CONTACTS, null, mAllContactsLoaderListener);
}
public void setListener(Listener listener) {
diff --git a/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java b/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java
index d42189e..b350f02 100644
--- a/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java
+++ b/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java
@@ -23,11 +23,7 @@
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-import android.widget.SectionIndexer;
-import com.android.contacts.common.list.ContactEntryListAdapter;
-import com.android.contacts.common.list.ContactListItemView;
import com.android.dialer.R;
import com.android.dialer.calllog.NewCallLogAdapter;
@@ -49,6 +45,7 @@
private final PhoneFavoritesTileAdapter mContactTileAdapter;
private final NewCallLogAdapter mCallLogAdapter;
private final View mLoadingView;
+ private final View mShowAllContactsButton;
private final int mCallLogPadding;
@@ -60,7 +57,8 @@
PhoneFavoritesTileAdapter contactTileAdapter,
View accountFilterHeaderContainer,
NewCallLogAdapter callLogAdapter,
- View loadingView) {
+ View loadingView,
+ View showAllContactsButton) {
final Resources resources = context.getResources();
mContext = context;
mCallLogPadding = resources.getDimensionPixelSize(R.dimen.recent_call_log_item_padding);
@@ -70,6 +68,7 @@
mObserver = new CustomDataSetObserver();
mContactTileAdapter.registerDataSetObserver(mObserver);
mLoadingView = loadingView;
+ mShowAllContactsButton = showAllContactsButton;
}
@Override
@@ -81,13 +80,11 @@
@Override
public int getCount() {
- return mContactTileAdapter.getCount() + mCallLogAdapter.getCount();
+ return mContactTileAdapter.getCount() + mCallLogAdapter.getCount() + 1;
}
@Override
public Object getItem(int position) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
-
final int callLogAdapterCount = mCallLogAdapter.getCount();
if (callLogAdapterCount > 0) {
@@ -108,7 +105,7 @@
@Override
public int getViewTypeCount() {
- return (mContactTileAdapter.getViewTypeCount() + mCallLogAdapter.getViewTypeCount());
+ return (mContactTileAdapter.getViewTypeCount() + mCallLogAdapter.getViewTypeCount() + 1);
}
@Override
@@ -119,18 +116,24 @@
// View type of the call log adapter is the last view type of the contact tile adapter
// + 1
return mContactTileAdapter.getViewTypeCount();
- } else {
+ } else if (position < getCount() - 1) {
return mContactTileAdapter.getItemViewType(
getAdjustedFavoritePosition(position, callLogAdapterCount));
+ } else {
+ // View type of the show all contact button is the last view type of the contact tile
+ // adapter + 2
+ return mContactTileAdapter.getViewTypeCount() + 1;
}
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
-
final int callLogAdapterCount = mCallLogAdapter.getCount();
+ if (position == getCount() - 1) {
+ return mShowAllContactsButton;
+ }
+
if (callLogAdapterCount > 0) {
if (position == 0) {
final FrameLayout wrapper;
@@ -189,7 +192,6 @@
@Override
public boolean isEnabled(int position) {
final int callLogAdapterCount = mCallLogAdapter.getCount();
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
if (position < callLogAdapterCount) {
return mCallLogAdapter.isEnabled(position);
} else { // For favorites section
@@ -201,5 +203,4 @@
private int getAdjustedFavoritePosition(int position, int callLogAdapterCount) {
return position - callLogAdapterCount;
}
-
}
diff --git a/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java b/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java
new file mode 100644
index 0000000..846b2a7
--- /dev/null
+++ b/src/com/android/dialer/list/PhoneFavoriteDragAndDropListeners.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2013 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.
+ */
+package com.android.dialer.list;
+
+import android.content.ClipData;
+import android.util.Log;
+import android.view.DragEvent;
+import android.view.GestureDetector.SimpleOnGestureListener;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnDragListener;
+
+import com.android.dialer.list.PhoneFavoritesTileAdapter.ContactTileRow;
+
+/**
+ * Implements the OnLongClickListener and OnDragListener for phone's favorite tiles and rows.
+ */
+public class PhoneFavoriteDragAndDropListeners {
+
+ private static final String TAG = PhoneFavoriteDragAndDropListeners.class.getSimpleName();
+ private static final boolean DEBUG = false;
+
+ private static final float FLING_HEIGHT_PORTION = 1.f / 4.f;
+ private static final float FLING_WIDTH_PORTION = 1.f / 6.f;
+
+ public static class PhoneFavoriteGestureListener extends SimpleOnGestureListener {
+ private static final float FLING_VELOCITY_MINIMUM = 5.0f;
+ private float mFlingHorizontalThreshold;
+ private float mFlingVerticalThreshold;
+ private final PhoneFavoriteTileView mView;
+
+ public PhoneFavoriteGestureListener(View view) {
+ super();
+ mView = (PhoneFavoriteTileView) view;
+ }
+
+ @Override
+ public void onLongPress(MotionEvent event) {
+ final ClipData data = ClipData.newPlainText("", "");
+ final View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(mView);
+ mView.setPressed(false);
+ if (mView instanceof PhoneFavoriteRegularRowView) {
+ // If the view is regular row, start drag the row view.
+ // TODO: move the padding so we can start drag the original view.
+ mView.getParentRow().startDrag(data, shadowBuilder, null, 0);
+ } else {
+ // If the view is a tile view, start drag the tile.
+ mView.startDrag(data, shadowBuilder, null, 0);
+ }
+ }
+
+ @Override
+ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
+ final float x1 = e1.getX();
+ final float x2 = e2.getX();
+ // Temporarily disables parents from getting this event so the listview does not scroll.
+ mView.getParent().requestDisallowInterceptTouchEvent(true);
+ mView.setScrollOffset(x2 - x1);
+ return true;
+ }
+
+ @Override
+ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
+ // Sets fling trigger threshold.
+ mFlingVerticalThreshold = (float) mView.getHeight() * FLING_HEIGHT_PORTION;
+ mFlingHorizontalThreshold = (float) mView.getWidth() * FLING_WIDTH_PORTION;
+ final float x1 = e1.getX();
+ final float x2 = e2.getX();
+ final float y1 = e1.getY();
+ final float y2 = e2.getY();
+
+ mView.setPressed(false);
+
+ if (Math.abs(y1 - y2) < mFlingVerticalThreshold &&
+ Math.abs(x2 - x1) > mFlingHorizontalThreshold &&
+ Math.abs(velocityX) > FLING_VELOCITY_MINIMUM) {
+ // If fling is triggered successfully, end the scroll and setup removal dialogue.
+ final int removeIndex = mView.getParentRow().getItemIndex(x1, y1);
+ mView.setScrollEnd(false);
+ mView.setupRemoveDialogue();
+ mView.getParentRow().getTileAdapter().setPotentialRemoveEntryIndex(removeIndex);
+
+ return true;
+ } else {
+ mView.setScrollEnd(true);
+ return false;
+ }
+ }
+
+ @Override
+ public boolean onDown(MotionEvent e) {
+ mView.setPressed(true);
+ // Signals that the view will accept further events.
+ return true;
+ }
+
+ @Override
+ public boolean onSingleTapUp(MotionEvent e) {
+ mView.performClick();
+ return true;
+ }
+ }
+
+ /**
+ * Implements the OnDragListener to handle drag events.
+ */
+ public static class PhoneFavoriteDragListener implements OnDragListener {
+ /** Location of the drag event. */
+ private float mX = 0;
+ private float mY = 0;
+ private final ContactTileRow mContactTileRow;
+ private final PhoneFavoritesTileAdapter mTileAdapter;
+
+ public PhoneFavoriteDragListener(ContactTileRow contactTileRow,
+ PhoneFavoritesTileAdapter tileAdapter) {
+ super();
+ mContactTileRow = contactTileRow;
+ mTileAdapter = tileAdapter;
+ }
+
+ @Override
+ public boolean onDrag(View v, DragEvent event) {
+ // Handles drag events.
+ switch (event.getAction()) {
+ case DragEvent.ACTION_DRAG_STARTED:
+ break;
+ case DragEvent.ACTION_DRAG_ENTERED:
+ break;
+ case DragEvent.ACTION_DRAG_EXITED:
+ break;
+ case DragEvent.ACTION_DROP:
+ // Gets the location of the drag with respect to the whole Dialer view.
+ mX = event.getX() + v.getLeft();
+ mY = event.getY() + v.getTop();
+
+ // Indicates a drag has finished.
+ if (mTileAdapter != null && mContactTileRow != null) {
+ mTileAdapter.setInDragging(false);
+
+ // Finds out at which position of the list the Contact is being dropped.
+ final int dropIndex = mContactTileRow.getItemIndex(mX, mY);
+ if (DEBUG) {
+ Log.v(TAG, "Stop dragging " + String.valueOf(dropIndex));
+ }
+
+ // Adds the dragged contact to the drop position.
+ mTileAdapter.dropContactEntry(dropIndex);
+ }
+ break;
+ case DragEvent.ACTION_DRAG_ENDED:
+ break;
+ case DragEvent.ACTION_DRAG_LOCATION:
+ // Gets the current drag location with respect to the whole Dialer view.
+ mX = event.getX() + v.getLeft();
+ mY = event.getY() + v.getTop();
+ if (DEBUG) {
+ Log.v(TAG, String.valueOf(mX) + "; " + String.valueOf(mY));
+ }
+
+ if (mTileAdapter != null && mContactTileRow != null) {
+ // If there is no drag in process, initializes the drag.
+ if (!mTileAdapter.getInDragging()) {
+ // Finds out which item is being dragged.
+ final int dragIndex = mContactTileRow.getItemIndex(mX, mY);
+ if (DEBUG) {
+ Log.v(TAG, "Start dragging " + String.valueOf(dragIndex));
+ }
+
+ // Indicates a drag has started.
+ mTileAdapter.setInDragging(true);
+
+ // Temporarily pops out the Contact entry.
+ mTileAdapter.popContactEntry(dragIndex);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ return true;
+ }
+ }
+}
diff --git a/src/com/android/dialer/list/PhoneFavoriteRegularRowView.java b/src/com/android/dialer/list/PhoneFavoriteRegularRowView.java
index 2f5921e..6d9fdcb 100644
--- a/src/com/android/dialer/list/PhoneFavoriteRegularRowView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteRegularRowView.java
@@ -16,29 +16,45 @@
package com.android.dialer.list;
import android.content.Context;
-import android.text.TextUtils;
import android.util.AttributeSet;
-import android.view.View;
+import android.view.GestureDetector;
-import com.android.contacts.common.MoreContactUtils;
-import com.android.contacts.common.list.ContactEntry;
-import com.android.contacts.common.list.ContactTileView;
import com.android.contacts.common.util.ViewUtil;
+import com.android.dialer.R;
+import com.android.dialer.list.PhoneFavoriteDragAndDropListeners.PhoneFavoriteDragListener;
+import com.android.dialer.list.PhoneFavoriteDragAndDropListeners.PhoneFavoriteGestureListener;
-/**
- * A light version of the {@link com.android.contacts.common.list.ContactTileView} that is used in Dialtacts
- * for frequently called contacts. Slightly different behavior from superclass...
- * when you tap it, you want to call the frequently-called number for the
- * contact, even if that is not the default number for that contact.
- */
-public class PhoneFavoriteRegularRowView extends ContactTileView {
- private String mPhoneNumberString;
+import com.android.dialer.list.PhoneFavoritesTileAdapter.ContactTileRow;
+
+
+public class PhoneFavoriteRegularRowView extends PhoneFavoriteTileView {
+ private static final String TAG = PhoneFavoriteRegularRowView.class.getSimpleName();
+ private static final boolean DEBUG = false;
public PhoneFavoriteRegularRowView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+
+ mFavoriteContactCard = findViewById(R.id.contact_favorite_card);
+ mRemovalDialogue = findViewById(R.id.favorite_remove_dialogue);
+ mUndoRemovalButton = findViewById(R.id.favorite_remove_undo_button);
+
+ mGestureDetector = new GestureDetector(getContext(),
+ new PhoneFavoriteGestureListener(this));
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ mParentRow = (ContactTileRow) getParent();
+ mParentRow.setOnDragListener(new PhoneFavoriteDragListener(mParentRow,
+ mParentRow.getTileAdapter()));
+ }
+
+ @Override
protected boolean isDarkTheme() {
return false;
}
@@ -47,36 +63,4 @@
protected int getApproximateImageSize() {
return ViewUtil.getConstantPreLayoutWidth(getQuickContact());
}
-
- @Override
- public void loadFromContact(ContactEntry entry) {
- super.loadFromContact(entry);
- mPhoneNumberString = null; // ... in case we're reusing the view
- if (entry != null) {
- // Grab the phone-number to call directly... see {@link onClick()}
- mPhoneNumberString = entry.phoneNumber;
- }
- }
-
- @Override
- protected OnClickListener createClickListener() {
- return new OnClickListener() {
- @Override
- public void onClick(View v) {
- if (mListener == null) return;
- if (TextUtils.isEmpty(mPhoneNumberString)) {
- // Copy "superclass" implementation
- mListener.onContactSelected(getLookupUri(), MoreContactUtils
- .getTargetRectFromView(
- mContext, PhoneFavoriteRegularRowView.this));
- } else {
- // When you tap a frequently-called contact, you want to
- // call them at the number that you usually talk to them
- // at (i.e. the one displayed in the UI), regardless of
- // whether that's their default number.
- mListener.onCallNumberDirectly(mPhoneNumberString);
- }
- }
- };
- }
}
diff --git a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
new file mode 100644
index 0000000..fe07d18
--- /dev/null
+++ b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
@@ -0,0 +1,82 @@
+/*
+
+ * 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.
+ */
+package com.android.dialer.list;
+
+import android.content.Context;
+import android.content.Intent;
+import android.util.AttributeSet;
+import android.view.GestureDetector;
+import android.view.View;
+import android.widget.ImageButton;
+
+import com.android.contacts.common.R;
+import com.android.dialer.list.PhoneFavoriteDragAndDropListeners.PhoneFavoriteDragListener;
+import com.android.dialer.list.PhoneFavoriteDragAndDropListeners.PhoneFavoriteGestureListener;
+import com.android.dialer.list.PhoneFavoritesTileAdapter.ContactTileRow;
+
+/**
+ * Displays the contact's picture overlayed with their name
+ * in a perfect square. It also has an additional touch target for a secondary action.
+ */
+public class PhoneFavoriteSquareTileView extends PhoneFavoriteTileView {
+ private static final String TAG = PhoneFavoriteSquareTileView.class.getSimpleName();
+ private ImageButton mSecondaryButton;
+
+ public PhoneFavoriteSquareTileView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+
+ mFavoriteContactCard = findViewById(com.android.dialer.R.id.contact_tile_favorite_card);
+ mRemovalDialogue = findViewById(com.android.dialer.R.id.favorite_tile_remove_dialogue);
+ mUndoRemovalButton = findViewById(com.android.dialer.R.id.favorite_tile_remove_undo_button);
+ mSecondaryButton = (ImageButton) findViewById(R.id.contact_tile_secondary_button);
+ mSecondaryButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(Intent.ACTION_VIEW, getLookupUri());
+ // Secondary target will be visible only from phone's favorite screen, then
+ // we want to launch it as a separate People task.
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ getContext().startActivity(intent);
+ }
+ });
+
+ mGestureDetector = new GestureDetector(getContext(),
+ new PhoneFavoriteGestureListener(this));
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ mParentRow = (ContactTileRow) getParent();
+ setOnDragListener(new PhoneFavoriteDragListener(mParentRow, mParentRow.getTileAdapter()));
+ }
+
+ @Override
+ protected boolean isDarkTheme() {
+ return false;
+ }
+
+ @Override
+ protected int getApproximateImageSize() {
+ // The picture is the full size of the tile (minus some padding, but we can be generous)
+ return mListener.getApproximateTileWidth();
+ }
+}
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index d87e2a8..9a1577a 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -1,4 +1,5 @@
/*
+
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,51 +16,239 @@
*/
package com.android.dialer.list;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
import android.content.Context;
-import android.content.Intent;
+import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.Log;
+import android.view.GestureDetector;
+import android.view.MotionEvent;
import android.view.View;
-import android.widget.ImageButton;
-import com.android.contacts.common.R;
+import com.android.contacts.common.MoreContactUtils;
+import com.android.contacts.common.list.ContactEntry;
import com.android.contacts.common.list.ContactTileView;
+import com.android.dialer.list.PhoneFavoritesTileAdapter.ContactTileRow;
/**
- * Displays the contact's picture overlayed with their name
- * in a perfect square. It also has an additional touch target for a secondary action.
+ * A light version of the {@link com.android.contacts.common.list.ContactTileView} that is used in
+ * Dialtacts for frequently called contacts. Slightly different behavior from superclass when you
+ * tap it, you want to call the frequently-called number for the contact, even if that is not the
+ * default number for that contact. This abstract class is the super class to both the row and tile
+ * view.
*/
-public class PhoneFavoriteTileView extends ContactTileView {
- private ImageButton mSecondaryButton;
+public abstract class PhoneFavoriteTileView extends ContactTileView {
+
+ private static final String TAG = PhoneFavoriteTileView.class.getSimpleName();
+ private static final boolean DEBUG = false;
+
+ /** Length of all animations in miniseconds. */
+ private static final int ANIMATION_LENGTH = 300;
+
+ /** The view that holds the front layer of the favorite contact card. */
+ protected View mFavoriteContactCard;
+ /** The view that holds the background layer of the removal dialogue. */
+ protected View mRemovalDialogue;
+ /** Undo button for undoing favorite removal. */
+ protected View mUndoRemovalButton;
+ /** The view that holds the list view row. */
+ protected ContactTileRow mParentRow;
+
+ /** Users' most frequent phone number. */
+ private String mPhoneNumberString;
+
+ /** Custom gesture detector.*/
+ protected GestureDetector mGestureDetector;
+ /** Indicator of whether a scroll has started. */
+ private boolean mInScroll;
public PhoneFavoriteTileView(Context context, AttributeSet attrs) {
super(context, attrs);
}
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
+ public ContactTileRow getParentRow() {
+ return mParentRow;
+ }
- mSecondaryButton = (ImageButton) findViewById(R.id.contact_tile_secondary_button);
- mSecondaryButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void loadFromContact(ContactEntry entry) {
+ super.loadFromContact(entry);
+ mPhoneNumberString = null; // ... in case we're reusing the view
+ if (entry != null) {
+ // Grab the phone-number to call directly... see {@link onClick()}
+ mPhoneNumberString = entry.phoneNumber;
+ }
+ }
+
+ /**
+ * Gets the latest scroll gesture offset.
+ */
+ public void setScrollOffset(float offset) {
+ // Sets the mInScroll variable to indicate a scroll is in progress.
+ if (!mInScroll) {
+ mInScroll = true;
+ }
+
+ // Changes the view to follow user's scroll position.
+ shiftViewWithScroll(offset);
+ }
+
+ /**
+ * Shifts the view to follow user's scroll position.
+ */
+ private void shiftViewWithScroll(float offset) {
+ if (mInScroll) {
+ // Shifts the foreground card to follow users' scroll gesture.
+ mFavoriteContactCard.setTranslationX(offset);
+
+ // Changes transparency of the foreground and background color
+ final float alpha = 1.f - Math.abs((offset)) / getWidth();
+ final float cappedAlpha = Math.min(Math.max(alpha, 0.f), 1.f);
+ mFavoriteContactCard.setAlpha(cappedAlpha);
+ }
+ }
+
+ /**
+ * Sets the scroll has finished.
+ *
+ * @param isUnfinishedFling True if it is triggered from the onFling method, but the fling was
+ * too short or too slow, or from the scroll that does not trigger fling.
+ */
+ public void setScrollEnd(boolean isUnfinishedFling) {
+ mInScroll = false;
+
+ if (isUnfinishedFling) {
+ // If the fling is too short or too slow, or it is from a scroll, bring back the
+ // favorite contact card.
+ final ObjectAnimator fadeIn = ObjectAnimator.ofFloat(mFavoriteContactCard, "alpha",
+ 1.f).setDuration(ANIMATION_LENGTH);
+ final ObjectAnimator moveBack = ObjectAnimator.ofFloat(mFavoriteContactCard,
+ "translationX", 0.f).setDuration(ANIMATION_LENGTH);
+ final ObjectAnimator backgroundFadeOut = ObjectAnimator.ofInt(
+ mParentRow.getBackground(), "alpha", 255).setDuration(ANIMATION_LENGTH);
+ final AnimatorSet animSet = new AnimatorSet();
+ animSet.playTogether(fadeIn, moveBack, backgroundFadeOut);
+ animSet.start();
+ } else {
+ // If the fling is fast and far enough, move away the favorite contact card, bring the
+ // favorite removal view to the foreground to ask user to confirm removal.
+ int animationLength = (int) ((1 - Math.abs(mFavoriteContactCard.getTranslationX()) /
+ getWidth()) * ANIMATION_LENGTH);
+ final ObjectAnimator fadeOut = ObjectAnimator.ofFloat(mFavoriteContactCard, "alpha",
+ 0.f).setDuration(animationLength);
+ final ObjectAnimator moveAway = ObjectAnimator.ofFloat(mFavoriteContactCard,
+ "translationX", getWidth()).setDuration(animationLength);
+ final ObjectAnimator backgroundFadeIn = ObjectAnimator.ofInt(
+ mParentRow.getBackground(), "alpha", 0).setDuration(animationLength);
+ if (mFavoriteContactCard.getTranslationX() < 0) {
+ moveAway.setFloatValues(-getWidth());
+ }
+ final AnimatorSet animSet = new AnimatorSet();
+ animSet.playTogether(fadeOut, moveAway, backgroundFadeIn);
+ animSet.start();
+ }
+ }
+
+ /**
+ * Signals the user wants to undo removing the favorite contact.
+ */
+ public void undoRemove() {
+ // Makes the removal dialogue invisible.
+ mRemovalDialogue.setAlpha(0.0f);
+ mRemovalDialogue.setVisibility(GONE);
+
+ // Animates back the favorite contact card.
+ final ObjectAnimator fadeIn = ObjectAnimator.ofFloat(mFavoriteContactCard, "alpha", 1.f).
+ setDuration(ANIMATION_LENGTH);
+ final ObjectAnimator moveBack = ObjectAnimator.ofFloat(mFavoriteContactCard, "translationX",
+ 0.f).setDuration(ANIMATION_LENGTH);
+ final ObjectAnimator backgroundFadeOut = ObjectAnimator.ofInt(mParentRow.getBackground(),
+ "alpha", 255).setDuration(ANIMATION_LENGTH);
+ final AnimatorSet animSet = new AnimatorSet();
+ animSet.playTogether(fadeIn, moveBack, backgroundFadeOut);
+ animSet.start();
+
+ // Signals the PhoneFavoritesTileAdapter to undo the potential delete.
+ mParentRow.getTileAdapter().undoPotentialRemoveEntryIndex();
+ }
+
+ /**
+ * Sets up the removal dialogue.
+ */
+ public void setupRemoveDialogue() {
+ mRemovalDialogue.setVisibility(VISIBLE);
+ mRemovalDialogue.setAlpha(1.0f);
+
+ mUndoRemovalButton.setOnClickListener(new OnClickListener() {
@Override
- public void onClick(View v) {
- Intent intent = new Intent(Intent.ACTION_VIEW, getLookupUri());
- // Secondary target will be visible only from phone's favorite screen, then
- // we want to launch it as a separate People task.
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
- getContext().startActivity(intent);
+ public void onClick(View view) {
+ undoRemove();
}
});
}
- @Override
- protected boolean isDarkTheme() {
- return false;
+ /**
+ * Sets up the favorite contact card.
+ */
+ public void setupFavoriteContactCard() {
+ if (mRemovalDialogue != null) {
+ mRemovalDialogue.setVisibility(GONE);
+ mRemovalDialogue.setAlpha(0.f);
+ }
+ mFavoriteContactCard.setAlpha(1.0f);
+ mFavoriteContactCard.setTranslationX(0.f);
}
@Override
- protected int getApproximateImageSize() {
- // The picture is the full size of the tile (minus some padding, but we can be generous)
- return mListener.getApproximateTileWidth();
+ protected OnClickListener createClickListener() {
+ return new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (mListener == null) return;
+ if (TextUtils.isEmpty(mPhoneNumberString)) {
+ // Copy "superclass" implementation
+ mListener.onContactSelected(getLookupUri(), MoreContactUtils
+ .getTargetRectFromView(
+ mContext, PhoneFavoriteTileView.this));
+ } else {
+ // When you tap a frequently-called contact, you want to
+ // call them at the number that you usually talk to them
+ // at (i.e. the one displayed in the UI), regardless of
+ // whether that's their default number.
+ mListener.onCallNumberDirectly(mPhoneNumberString);
+ }
+ }
+ };
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (DEBUG) {
+ Log.v(TAG, event.toString());
+ }
+ switch (event.getAction()) {
+ // If the scroll has finished without triggering a fling, handles it here.
+ case MotionEvent.ACTION_UP:
+ setPressed(false);
+ if (mInScroll) {
+ if (!mGestureDetector.onTouchEvent(event)) {
+ setScrollEnd(true);
+ }
+ return true;
+ }
+ break;
+ // When user starts a new gesture, clean up the pending removals.
+ case MotionEvent.ACTION_DOWN:
+ mParentRow.getTileAdapter().removeContactEntry();
+ break;
+ // When user continues with a new gesture, cleans up all the temp variables.
+ case MotionEvent.ACTION_CANCEL:
+ mParentRow.getTileAdapter().cleanTempVariables();
+ break;
+ default:
+ break;
+ }
+ return mGestureDetector.onTouchEvent(event);
}
}
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
index 3657906..0a08f2c 100644
--- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
+++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
@@ -15,11 +15,13 @@
*/
package com.android.dialer.list;
+import android.animation.ObjectAnimator;
import android.content.ContentUris;
import android.content.Context;
import android.content.res.Resources;
import android.database.Cursor;
-import android.graphics.drawable.Drawable;
+import android.graphics.Color;
+import android.graphics.Rect;
import android.net.Uri;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
@@ -33,7 +35,6 @@
import com.android.contacts.common.ContactTileLoaderFactory;
import com.android.contacts.common.R;
import com.android.contacts.common.list.ContactEntry;
-import com.android.contacts.common.list.ContactTileAdapter;
import com.android.contacts.common.list.ContactTileView;
import java.util.ArrayList;
@@ -45,14 +46,33 @@
*
*/
public class PhoneFavoritesTileAdapter extends BaseAdapter {
- private static final String TAG = ContactTileAdapter.class.getSimpleName();
+ private static final String TAG = PhoneFavoritesTileAdapter.class.getSimpleName();
+ private static final boolean DEBUG = false;
public static final int ROW_LIMIT_DEFAULT = 1;
+ /** Time period for an animation. */
+ private static final int ANIMATION_LENGTH = 300;
+
+ private final ObjectAnimator mTranslateHorizontalAnimation;
+ private final ObjectAnimator mTranslateVerticalAnimation;
+ private final ObjectAnimator mAlphaAnimation;
+
private ContactTileView.Listener mListener;
private Context mContext;
private Resources mResources;
- protected Cursor mContactCursor = null;
+
+ /** Contact data stored in cache. This is used to populate the associated view. */
+ protected ArrayList<ContactEntry> mContactEntries = null;
+ /** Back up of the temporarily removed Contact during dragging. */
+ private ContactEntry mDraggedEntry = null;
+ /** Position of the temporarily removed contact in the cache. */
+ private int mDraggedEntryIndex = -1;
+ /** New position of the temporarily removed contact in the cache. */
+ private int mDropEntryIndex = -1;
+ /** Position of the contact pending removal. */
+ private int mPotentialRemoveEntryIndex = -1;
+
private ContactPhotoManager mPhotoManager;
protected int mNumFrequents;
protected int mNumStarred;
@@ -78,22 +98,36 @@
private boolean mIsQuickContactEnabled = false;
private final int mPaddingInPixels;
- public PhoneFavoritesTileAdapter(Context context, ContactTileView.Listener listener, int numCols) {
+ /** Indicates whether a drag is in process. */
+ private boolean mInDragging = false;
+
+ public PhoneFavoritesTileAdapter(Context context, ContactTileView.Listener listener,
+ int numCols) {
this(context, listener, numCols, ROW_LIMIT_DEFAULT);
}
- public PhoneFavoritesTileAdapter(Context context, ContactTileView.Listener listener, int numCols,
- int maxTiledRows) {
+ public PhoneFavoritesTileAdapter(Context context, ContactTileView.Listener listener,
+ int numCols, int maxTiledRows) {
mListener = listener;
mContext = context;
mResources = context.getResources();
mColumnCount = numCols;
mNumFrequents = 0;
mMaxTiledRows = maxTiledRows;
-
+ mContactEntries = new ArrayList<ContactEntry>();
// Converting padding in dips to padding in pixels
mPaddingInPixels = mContext.getResources()
- .getDimensionPixelSize(R.dimen.phone_contact_tile_divider_padding);
+ .getDimensionPixelSize(R.dimen.contact_tile_divider_padding);
+
+ // Initiates all animations.
+ mAlphaAnimation = ObjectAnimator.ofFloat(null, "alpha", 1.f).setDuration(ANIMATION_LENGTH);
+
+ mTranslateHorizontalAnimation = ObjectAnimator.ofFloat(null, "translationX", 0.f).
+ setDuration(ANIMATION_LENGTH);
+
+ mTranslateVerticalAnimation = ObjectAnimator.ofFloat(null, "translationY", 0.f).setDuration(
+ ANIMATION_LENGTH);
+
bindColumnIndices();
}
@@ -114,6 +148,20 @@
}
/**
+ * Indicates whether a drag is in process.
+ *
+ * @param inDragging Boolean variable indicating whether there is a drag in process.
+ */
+ public void setInDragging(boolean inDragging) {
+ mInDragging = inDragging;
+ }
+
+ /** Gets whether the drag is in process. */
+ public boolean getInDragging() {
+ return mInDragging;
+ }
+
+ /**
* Sets the column indices for expected {@link Cursor}
* based on {@link DisplayType}.
*/
@@ -148,13 +196,49 @@
* Else use {@link ContactTileLoaderFactory}
*/
public void setContactCursor(Cursor cursor) {
- mContactCursor = cursor;
- mNumStarred = getNumStarredContacts(cursor);
+ if (cursor != null && !cursor.isClosed()) {
+ mNumStarred = getNumStarredContacts(cursor);
+ saveNumFrequentsFromCursor(cursor);
+ saveCursorToCache(cursor);
- saveNumFrequentsFromCursor(cursor);
+ // cause a refresh of any views that rely on this data
+ notifyDataSetChanged();
+ }
+ }
- // cause a refresh of any views that rely on this data
- notifyDataSetChanged();
+ /**
+ * Saves the cursor data to the cache, to speed up UI changes.
+ *
+ * @param cursor Returned cursor with data to populate the view.
+ */
+ private void saveCursorToCache(Cursor cursor) {
+ mContactEntries.clear();
+ try {
+ cursor.moveToPosition(-1);
+ while (cursor.moveToNext()) {
+ final long id = cursor.getLong(mIdIndex);
+ final String photoUri = cursor.getString(mPhotoUriIndex);
+ final String lookupKey = cursor.getString(mLookupIndex);
+
+ final ContactEntry contact = new ContactEntry();
+ final String name = cursor.getString(mNameIndex);
+ contact.name = (name != null) ? name : mResources.getString(R.string.missing_name);
+ contact.status = cursor.getString(mStatusIndex);
+ contact.photoUri = (photoUri != null ? Uri.parse(photoUri) : null);
+ contact.lookupKey = ContentUris.withAppendedId(
+ Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey), id);
+
+ // Set phone number and label
+ final int phoneNumberType = cursor.getInt(mPhoneNumberTypeIndex);
+ final String phoneNumberCustomLabel = cursor.getString(mPhoneNumberLabelIndex);
+ contact.phoneLabel = (String) Phone.getTypeLabel(mResources, phoneNumberType,
+ phoneNumberCustomLabel);
+ contact.phoneNumber = cursor.getString(mPhoneNumberIndex);
+ mContactEntries.add(contact);
+ }
+ } finally {
+ cursor.close();
+ }
}
/**
@@ -164,10 +248,6 @@
* Returns 0 if {@link DisplayType#FREQUENT_ONLY}
*/
protected int getNumStarredContacts(Cursor cursor) {
- if (cursor == null || cursor.isClosed()) {
- throw new IllegalStateException("Unable to access cursor");
- }
-
cursor.moveToPosition(-1);
while (cursor.moveToNext()) {
if (cursor.getInt(mStarredIndex) == 0) {
@@ -180,32 +260,15 @@
return cursor.getCount();
}
- protected ContactEntry createContactEntryFromCursor(Cursor cursor, int position) {
- // If the loader was canceled we will be given a null cursor.
- // In that case, show an empty list of contacts.
- if (cursor == null || cursor.isClosed() || cursor.getCount() <= position) return null;
-
- cursor.moveToPosition(position);
- long id = cursor.getLong(mIdIndex);
- String photoUri = cursor.getString(mPhotoUriIndex);
- String lookupKey = cursor.getString(mLookupIndex);
-
- ContactEntry contact = new ContactEntry();
- String name = cursor.getString(mNameIndex);
- contact.name = (name != null) ? name : mResources.getString(R.string.missing_name);
- contact.status = cursor.getString(mStatusIndex);
- contact.photoUri = (photoUri != null ? Uri.parse(photoUri) : null);
- contact.lookupKey = ContentUris.withAppendedId(
- Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey), id);
-
- // Set phone number and label
- int phoneNumberType = cursor.getInt(mPhoneNumberTypeIndex);
- String phoneNumberCustomLabel = cursor.getString(mPhoneNumberLabelIndex);
- contact.phoneLabel = (String) Phone.getTypeLabel(mResources, phoneNumberType,
- phoneNumberCustomLabel);
- contact.phoneNumber = cursor.getString(mPhoneNumberIndex);
-
- return contact;
+ /**
+ * Loads a contact from the cached list.
+ *
+ * @param position Position of the Contact.
+ * @return Contact at the requested position.
+ */
+ protected ContactEntry getContactEntryFromCache(int position) {
+ if (mContactEntries.size() <= position) return null;
+ return mContactEntries.get(position);
}
/**
@@ -217,11 +280,12 @@
@Override
public int getCount() {
- if (mContactCursor == null || mContactCursor.isClosed()) {
+ if (mContactEntries == null) {
return 0;
}
- final int total = mNumFrequents + mNumStarred;
+ int total = mNumFrequents + mNumStarred;
+
return total - (mMaxTiledRows * (mColumnCount - 1));
}
@@ -243,6 +307,14 @@
return mColumnCount * mMaxTiledRows;
}
+ protected int getRowIndex(int entryIndex) {
+ if (entryIndex < mMaxTiledRows * mColumnCount) {
+ return entryIndex / mColumnCount;
+ } else {
+ return entryIndex - mMaxTiledRows * mColumnCount + mMaxTiledRows;
+ }
+ }
+
public int getColumnCount() {
return mColumnCount;
}
@@ -260,7 +332,7 @@
// Contacts that appear as tiles
for (int columnCounter = 0; columnCounter < mColumnCount &&
contactIndex != maxContactsInTiles; columnCounter++) {
- resultList.add(createContactEntryFromCursor(mContactCursor, contactIndex));
+ resultList.add(getContactEntryFromCache(contactIndex));
contactIndex++;
}
} else {
@@ -268,7 +340,7 @@
// The actual position of the contact in the cursor is simply total the number of
// tiled contacts + the given position
contactIndex = maxContactsInTiles + position - 1;
- resultList.add(createContactEntryFromCursor(mContactCursor, contactIndex));
+ resultList.add(getContactEntryFromCache(contactIndex));
}
return resultList;
@@ -294,18 +366,89 @@
}
@Override
+ public void notifyDataSetChanged() {
+ if (DEBUG) {
+ Log.v(TAG, "nofigyDataSetChanged");
+ }
+ super.notifyDataSetChanged();
+ }
+
+ /**
+ * Configures the animation for each view.
+ *
+ * @param contactTileRowView The row to be animated.
+ * @param position The position of the row.
+ * @param itemViewType The type of the row.
+ */
+ private void configureAnimationToView(ContactTileRow contactTileRowView, int position,
+ int itemViewType) {
+ if (mInDragging) {
+ // If the one item above the row is being dragged, animates all following items to
+ // move up. If the item is a favorite tile, animate it to appear from right.
+ if (position >= getRowIndex(mDraggedEntryIndex)) {
+ if (itemViewType == ViewTypes.FREQUENT) {
+ mTranslateVerticalAnimation.setTarget(contactTileRowView);
+ mTranslateVerticalAnimation.setFloatValues(contactTileRowView.getHeight(), 0);
+ mTranslateVerticalAnimation.clone().start();
+ } else {
+ contactTileRowView.animateTilesAppearLeft(mDraggedEntryIndex -
+ position * mColumnCount);
+ }
+ }
+ } else if (mDropEntryIndex != -1) {
+ // If one item is dropped in front the row, animate all following rows to shift down.
+ // If the item is a favorite tile, animate it to appear from left.
+ if (position >= getRowIndex(mDropEntryIndex)) {
+ if (itemViewType == ViewTypes.FREQUENT) {
+ if (position == getRowIndex(mDropEntryIndex) || position == mMaxTiledRows) {
+ contactTileRowView.setVisibility(View.VISIBLE);
+ mAlphaAnimation.setTarget(contactTileRowView);
+ mAlphaAnimation.clone().start();
+ } else {
+ mTranslateVerticalAnimation.setTarget(contactTileRowView);
+ mTranslateVerticalAnimation.setFloatValues(-contactTileRowView.getHeight(),
+ 0);
+ mTranslateVerticalAnimation.clone().start();
+ }
+ } else {
+ contactTileRowView.animateTilesAppearRight(mDropEntryIndex + 1 -
+ position * mColumnCount);
+ }
+ }
+ } else if (mPotentialRemoveEntryIndex != -1) {
+ // If one item is to be removed above this row, animate the row to shift up. If it is
+ // a favorite contact tile, animate it to appear from right.
+ if (position >= getRowIndex(mPotentialRemoveEntryIndex)) {
+ if (itemViewType == ViewTypes.FREQUENT) {
+ mTranslateVerticalAnimation.setTarget(contactTileRowView);
+ mTranslateVerticalAnimation.setFloatValues(contactTileRowView.getHeight(), 0);
+ mTranslateVerticalAnimation.clone().start();
+ } else {
+ contactTileRowView.animateTilesAppearLeft(
+ mPotentialRemoveEntryIndex - position * mColumnCount);
+ }
+ }
+ }
+ }
+
+ @Override
public View getView(int position, View convertView, ViewGroup parent) {
+ Log.v(TAG, "get view for " + String.valueOf(position));
int itemViewType = getItemViewType(position);
- ContactTileRow contactTileRowView = (ContactTileRow) convertView;
+ ContactTileRow contactTileRowView = (ContactTileRow) convertView;
+
ArrayList<ContactEntry> contactList = getItem(position);
if (contactTileRowView == null) {
// Creating new row if needed
- contactTileRowView = new ContactTileRow(mContext, itemViewType);
+ contactTileRowView = new ContactTileRow(mContext, itemViewType, position);
}
- contactTileRowView.configureRow(contactList, position == getCount() - 1);
+ contactTileRowView.configureRow(contactList, position, position == getCount() - 1);
+
+ configureAnimationToView(contactTileRowView, position, itemViewType);
+
return contactTileRowView;
}
@@ -345,22 +488,100 @@
}
/**
+ * Temporarily removes a contact from the list for UI refresh. Stores data for this contact
+ * in the back-up variable.
+ *
+ * @param index Position of the contact to be removed.
+ */
+ public void popContactEntry(int index) {
+ if (index >= 0 && index < mContactEntries.size()) {
+ mDraggedEntry = mContactEntries.get(index);
+ mDraggedEntryIndex = index;
+ mContactEntries.remove(index);
+ notifyDataSetChanged();
+ }
+ }
+
+ /**
+ * Drops the temporarily removed contact to the desired location in the list.
+ *
+ * @param index Location where the contact will be dropped.
+ */
+ public void dropContactEntry(int index) {
+ if (mDraggedEntry != null) {
+ if (index >= 0 && index <= mContactEntries.size()) {
+ mContactEntries.add(index, mDraggedEntry);
+ mDropEntryIndex = index;
+ } else if (mDraggedEntryIndex >= 0 && mDraggedEntryIndex <= mContactEntries.size()) {
+ /** If the index is invalid, falls back to the original position of the contact. */
+ mContactEntries.add(mDraggedEntryIndex, mDraggedEntry);
+ mDropEntryIndex = mDraggedEntryIndex;
+ }
+ mDraggedEntry = null;
+ notifyDataSetChanged();
+ }
+ }
+
+ /**
+ * Sets an item to for pending removal. If the user does not click the undo button, the item
+ * will be removed at the next interaction.
+ *
+ * @param index Index of the item to be removed.
+ */
+ public void setPotentialRemoveEntryIndex(int index) {
+ mPotentialRemoveEntryIndex = index;
+ }
+
+ /**
+ * Removes a contact entry from the cache.
+ *
+ * @return True is an item is removed. False is there is no item to be removed.
+ */
+ public boolean removeContactEntry() {
+ if (mPotentialRemoveEntryIndex >= 0 && mPotentialRemoveEntryIndex < mContactEntries.size()) {
+ mContactEntries.remove(mPotentialRemoveEntryIndex);
+ notifyDataSetChanged();
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Resets the item for pending removal.
+ */
+ public void undoPotentialRemoveEntryIndex() {
+ mPotentialRemoveEntryIndex = -1;
+ }
+
+ /**
+ * Clears all temporary variables at a new interaction.
+ */
+ public void cleanTempVariables() {
+ mDraggedEntryIndex = -1;
+ mDropEntryIndex = -1;
+ mDraggedEntry = null;
+ mPotentialRemoveEntryIndex = -1;
+ }
+
+ /**
* Acts as a row item composed of {@link ContactTileView}
*
* TODO: FREQUENT doesn't really need it. Just let {@link #getView} return
*/
- private class ContactTileRow extends FrameLayout {
+ public class ContactTileRow extends FrameLayout {
private int mItemViewType;
private int mLayoutResId;
private final int mRowPaddingStart;
private final int mRowPaddingEnd;
private final int mRowPaddingTop;
private final int mRowPaddingBottom;
+ private int mPosition;
- public ContactTileRow(Context context, int itemViewType) {
+ public ContactTileRow(Context context, int itemViewType, int position) {
super(context);
mItemViewType = itemViewType;
mLayoutResId = getLayoutResourceId(mItemViewType);
+ mPosition = position;
final Resources resources = mContext.getResources();
mRowPaddingStart = resources.getDimensionPixelSize(
@@ -384,8 +605,9 @@
/**
* Configures the row to add {@link ContactEntry}s information to the views
*/
- public void configureRow(ArrayList<ContactEntry> list, boolean isLastRow) {
+ public void configureRow(ArrayList<ContactEntry> list, int position, boolean isLastRow) {
int columnCount = mItemViewType == ViewTypes.FREQUENT ? 1 : mColumnCount;
+ mPosition = position;
// Adding tiles to row and filling in contact information
for (int columnCounter = 0; columnCounter < columnCount; columnCounter++) {
@@ -396,11 +618,11 @@
}
private void addTileFromEntry(ContactEntry entry, int childIndex, boolean isLastRow) {
- final ContactTileView contactTile;
+ final PhoneFavoriteTileView contactTile;
if (getChildCount() <= childIndex) {
- contactTile = (ContactTileView) inflate(mContext, mLayoutResId, null);
+ contactTile = (PhoneFavoriteTileView) inflate(mContext, mLayoutResId, null);
// Note: the layoutparam set here is only actually used for FREQUENT.
// We override onMeasure() for STARRED and we don't care the layout param there.
final Resources resources = mContext.getResources();
@@ -409,18 +631,17 @@
ViewGroup.LayoutParams.WRAP_CONTENT);
params.setMargins(
- resources.getDimensionPixelSize(R.dimen.detail_item_side_margin),
- 0,
- resources.getDimensionPixelSize(R.dimen.detail_item_side_margin),
- 0);
+ resources.getDimensionPixelSize(R.dimen.detail_item_side_margin), 0,
+ resources.getDimensionPixelSize(R.dimen.detail_item_side_margin), 0);
contactTile.setLayoutParams(params);
contactTile.setPhotoManager(mPhotoManager);
contactTile.setListener(mListener);
addView(contactTile);
} else {
- contactTile = (ContactTileView) getChildAt(childIndex);
+ contactTile = (PhoneFavoriteTileView) getChildAt(childIndex);
}
contactTile.loadFromContact(entry);
+ contactTile.setId(childIndex);
switch (mItemViewType) {
case ViewTypes.TOP:
// Setting divider visibilities
@@ -434,6 +655,7 @@
default:
break;
}
+ contactTile.setupFavoriteContactCard();
}
@Override
@@ -516,6 +738,65 @@
}
setMeasuredDimension(width, imageSize + getPaddingTop() + getPaddingBottom());
}
+
+ /**
+ * Gets the index of the item at the specified coordinates.
+ *
+ * @param itemX X-coordinate of the selected item.
+ * @param itemY Y-coordinate of the selected item.
+ * @return Index of the selected item in the cached array.
+ */
+ public int getItemIndex(float itemX, float itemY) {
+ if (mPosition < mMaxTiledRows) {
+ final Rect childRect = new Rect();
+ if (DEBUG) {
+ Log.v(TAG, String.valueOf(itemX) + " " + String.valueOf(itemY));
+ }
+ for (int i = 0; i < getChildCount(); ++i) {
+ /** If the row contains multiple tiles, checks each tile to see if the point
+ * is contained in the tile. */
+ getChildAt(i).getHitRect(childRect);
+ if (DEBUG) {
+ Log.v(TAG, childRect.toString());
+ }
+ if (childRect.contains((int)itemX, (int)itemY)) {
+ /** If the point is contained in the rectangle, computes the index of the
+ * item in the cached array. */
+ return i + (mPosition) * mColumnCount;
+ }
+ }
+ } else {
+ /** If the selected item is one of the rows, compute the index. */
+ return (mPosition - mMaxTiledRows) + mColumnCount * mMaxTiledRows;
+ }
+ return -1;
+ }
+
+ public PhoneFavoritesTileAdapter getTileAdapter() {
+ return PhoneFavoritesTileAdapter.this;
+ }
+
+ public void animateTilesAppearLeft(int index) {
+ for (int i = index; i < getChildCount(); ++i) {
+ View childView = getChildAt(i);
+ mTranslateHorizontalAnimation.setTarget(childView);
+ mTranslateHorizontalAnimation.setFloatValues(childView.getWidth(), 0);
+ mTranslateHorizontalAnimation.clone().start();
+ }
+ }
+
+ public void animateTilesAppearRight(int index) {
+ for (int i = index; i < getChildCount(); ++i) {
+ View childView = getChildAt(i);
+ mTranslateHorizontalAnimation.setTarget(childView);
+ mTranslateHorizontalAnimation.setFloatValues(-childView.getWidth(), 0);
+ mTranslateHorizontalAnimation.clone().start();
+ }
+ }
+
+ public int getPosition() {
+ return mPosition;
+ }
}
protected static class ViewTypes {
diff --git a/src/com/android/dialer/list/ShowAllContactsFragment.java b/src/com/android/dialer/list/ShowAllContactsFragment.java
new file mode 100644
index 0000000..85806b6
--- /dev/null
+++ b/src/com/android/dialer/list/ShowAllContactsFragment.java
@@ -0,0 +1,89 @@
+/*
+
+ * Copyright (C) 2013 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.
+ */
+
+package com.android.dialer.list;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.os.Bundle;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.TypefaceSpan;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.android.contacts.common.list.ContactListItemView;
+import com.android.contacts.common.list.PhoneNumberPickerFragment;
+import com.android.dialer.R;
+
+// TODO{klp}: Wrap this fragment with an activity.
+/**
+ * Fragments to show all contacts with phone numbers.
+ */
+public class ShowAllContactsFragment extends PhoneNumberPickerFragment{
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+
+ // Customizes the listview according to the dialer specifics.
+ setQuickContactEnabled(true);
+ setDarkTheme(false);
+ setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(true /* opposite */));
+ setUseCallableUri(true);
+ }
+
+ @Override
+ public void onStart() {
+ // Displays action bar for quick navigation.
+ final ActionBar actionBar = getActivity().getActionBar();
+ actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+ actionBar.setDisplayShowHomeEnabled(true);
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setDisplayShowTitleEnabled(true);
+
+ final SpannableString s = new SpannableString(getString(R.string.show_all_contacts_title));
+ s.setSpan(new TypefaceSpan(getString(R.string.show_all_contacts_title)), 0,
+ s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ actionBar.setTitle(s);
+
+ super.onStart();
+ }
+
+ @Override
+ public void onHiddenChanged(boolean hidden) {
+ // Hides the action bar as it is hidden in the main activity
+ if (getActivity() != null) {
+ if (hidden) {
+ getActivity().getActionBar().hide();
+ } else {
+ getActivity().getActionBar().show();
+ }
+ }
+ }
+
+ @Override
+ protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+ return inflater.inflate(R.layout.show_all_contacts_fragment, null);
+ }
+}