merge in klp-release history after reset to klp-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 91e228e..d268345 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -60,7 +60,7 @@
dialpad screen. -->
<activity android:name=".DialtactsActivity"
android:label="@string/launcherDialer"
- android:theme="@style/NewDialtactsTheme"
+ android:theme="@style/DialtactsTheme"
android:uiOptions="splitActionBarWhenNarrow"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
@@ -119,7 +119,7 @@
<activity android:name="com.android.dialer.calllog.CallLogActivity"
android:label="@string/call_log_activity_title"
- android:theme="@style/NewDialtactsTheme"
+ android:theme="@style/DialtactsTheme"
android:screenOrientation="portrait"
android:icon="@mipmap/ic_launcher_phone">
<intent-filter>
@@ -130,6 +130,12 @@
</intent-filter>
</activity>
+ <activity android:name="com.android.dialer.list.AllContactsActivity"
+ android:label="@string/show_all_contacts_title"
+ android:theme="@style/DialtactsTheme"
+ android:screenOrientation="portrait">
+ </activity>
+
<activity android:name="com.android.dialer.CallDetailActivity"
android:label="@string/callDetailTitle"
android:theme="@style/CallDetailActivityTheme"
diff --git a/res/drawable-ar-hdpi/dial_num_0_wht.png b/res/drawable-ar-hdpi/dial_num_0_wht.png
deleted file mode 100644
index d06bb6b..0000000
--- a/res/drawable-ar-hdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_1_wht.png b/res/drawable-ar-hdpi/dial_num_1_wht.png
deleted file mode 100644
index 397ec32..0000000
--- a/res/drawable-ar-hdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_2_wht.png b/res/drawable-ar-hdpi/dial_num_2_wht.png
deleted file mode 100644
index ca62c2d..0000000
--- a/res/drawable-ar-hdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_3_wht.png b/res/drawable-ar-hdpi/dial_num_3_wht.png
deleted file mode 100644
index 8872968..0000000
--- a/res/drawable-ar-hdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_4_wht.png b/res/drawable-ar-hdpi/dial_num_4_wht.png
deleted file mode 100644
index 6f68884..0000000
--- a/res/drawable-ar-hdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_5_wht.png b/res/drawable-ar-hdpi/dial_num_5_wht.png
deleted file mode 100644
index d107f73..0000000
--- a/res/drawable-ar-hdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_6_wht.png b/res/drawable-ar-hdpi/dial_num_6_wht.png
deleted file mode 100644
index e46474e..0000000
--- a/res/drawable-ar-hdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_7_wht.png b/res/drawable-ar-hdpi/dial_num_7_wht.png
deleted file mode 100644
index d121401..0000000
--- a/res/drawable-ar-hdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_8_wht.png b/res/drawable-ar-hdpi/dial_num_8_wht.png
deleted file mode 100644
index 546574b..0000000
--- a/res/drawable-ar-hdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-hdpi/dial_num_9_wht.png b/res/drawable-ar-hdpi/dial_num_9_wht.png
deleted file mode 100644
index 7e6a712..0000000
--- a/res/drawable-ar-hdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_0_wht.png b/res/drawable-ar-mdpi/dial_num_0_wht.png
deleted file mode 100644
index 5f7eb7f..0000000
--- a/res/drawable-ar-mdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_1_wht.png b/res/drawable-ar-mdpi/dial_num_1_wht.png
deleted file mode 100644
index 8a7d086..0000000
--- a/res/drawable-ar-mdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_2_wht.png b/res/drawable-ar-mdpi/dial_num_2_wht.png
deleted file mode 100644
index 87c1d49..0000000
--- a/res/drawable-ar-mdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_3_wht.png b/res/drawable-ar-mdpi/dial_num_3_wht.png
deleted file mode 100644
index e600393..0000000
--- a/res/drawable-ar-mdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_4_wht.png b/res/drawable-ar-mdpi/dial_num_4_wht.png
deleted file mode 100644
index d2414c9..0000000
--- a/res/drawable-ar-mdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_5_wht.png b/res/drawable-ar-mdpi/dial_num_5_wht.png
deleted file mode 100644
index 060f904..0000000
--- a/res/drawable-ar-mdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_6_wht.png b/res/drawable-ar-mdpi/dial_num_6_wht.png
deleted file mode 100644
index 5763ab8..0000000
--- a/res/drawable-ar-mdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_7_wht.png b/res/drawable-ar-mdpi/dial_num_7_wht.png
deleted file mode 100644
index 5c81896..0000000
--- a/res/drawable-ar-mdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_8_wht.png b/res/drawable-ar-mdpi/dial_num_8_wht.png
deleted file mode 100644
index 7744206..0000000
--- a/res/drawable-ar-mdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-mdpi/dial_num_9_wht.png b/res/drawable-ar-mdpi/dial_num_9_wht.png
deleted file mode 100644
index a0c488c..0000000
--- a/res/drawable-ar-mdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_0_wht.png b/res/drawable-ar-xhdpi/dial_num_0_wht.png
deleted file mode 100644
index 069afe6..0000000
--- a/res/drawable-ar-xhdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_1_wht.png b/res/drawable-ar-xhdpi/dial_num_1_wht.png
deleted file mode 100644
index b960b45..0000000
--- a/res/drawable-ar-xhdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_2_wht.png b/res/drawable-ar-xhdpi/dial_num_2_wht.png
deleted file mode 100644
index 9c6d393..0000000
--- a/res/drawable-ar-xhdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_3_wht.png b/res/drawable-ar-xhdpi/dial_num_3_wht.png
deleted file mode 100644
index 16cc930..0000000
--- a/res/drawable-ar-xhdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_4_wht.png b/res/drawable-ar-xhdpi/dial_num_4_wht.png
deleted file mode 100644
index 2de96da..0000000
--- a/res/drawable-ar-xhdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_5_wht.png b/res/drawable-ar-xhdpi/dial_num_5_wht.png
deleted file mode 100644
index a0b1d8a..0000000
--- a/res/drawable-ar-xhdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_6_wht.png b/res/drawable-ar-xhdpi/dial_num_6_wht.png
deleted file mode 100644
index 24cc107..0000000
--- a/res/drawable-ar-xhdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_7_wht.png b/res/drawable-ar-xhdpi/dial_num_7_wht.png
deleted file mode 100644
index 59be814..0000000
--- a/res/drawable-ar-xhdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_8_wht.png b/res/drawable-ar-xhdpi/dial_num_8_wht.png
deleted file mode 100644
index 30f30d2..0000000
--- a/res/drawable-ar-xhdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-ar-xhdpi/dial_num_9_wht.png b/res/drawable-ar-xhdpi/dial_num_9_wht.png
deleted file mode 100644
index 12651f3..0000000
--- a/res/drawable-ar-xhdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_0_wht.png b/res/drawable-fa-hdpi/dial_num_0_wht.png
deleted file mode 100644
index d06bb6b..0000000
--- a/res/drawable-fa-hdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_1_wht.png b/res/drawable-fa-hdpi/dial_num_1_wht.png
deleted file mode 100644
index 397ec32..0000000
--- a/res/drawable-fa-hdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_2_wht.png b/res/drawable-fa-hdpi/dial_num_2_wht.png
deleted file mode 100644
index ca62c2d..0000000
--- a/res/drawable-fa-hdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_3_wht.png b/res/drawable-fa-hdpi/dial_num_3_wht.png
deleted file mode 100644
index 8872968..0000000
--- a/res/drawable-fa-hdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_4_wht.png b/res/drawable-fa-hdpi/dial_num_4_wht.png
deleted file mode 100644
index 72e5904..0000000
--- a/res/drawable-fa-hdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_5_wht.png b/res/drawable-fa-hdpi/dial_num_5_wht.png
deleted file mode 100644
index 9261534..0000000
--- a/res/drawable-fa-hdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_6_wht.png b/res/drawable-fa-hdpi/dial_num_6_wht.png
deleted file mode 100644
index 2f6141d..0000000
--- a/res/drawable-fa-hdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_7_wht.png b/res/drawable-fa-hdpi/dial_num_7_wht.png
deleted file mode 100644
index d121401..0000000
--- a/res/drawable-fa-hdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_8_wht.png b/res/drawable-fa-hdpi/dial_num_8_wht.png
deleted file mode 100644
index 546574b..0000000
--- a/res/drawable-fa-hdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-hdpi/dial_num_9_wht.png b/res/drawable-fa-hdpi/dial_num_9_wht.png
deleted file mode 100644
index 7e6a712..0000000
--- a/res/drawable-fa-hdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_0_wht.png b/res/drawable-fa-mdpi/dial_num_0_wht.png
deleted file mode 100644
index 5f7eb7f..0000000
--- a/res/drawable-fa-mdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_1_wht.png b/res/drawable-fa-mdpi/dial_num_1_wht.png
deleted file mode 100644
index 8a7d086..0000000
--- a/res/drawable-fa-mdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_2_wht.png b/res/drawable-fa-mdpi/dial_num_2_wht.png
deleted file mode 100644
index 87c1d49..0000000
--- a/res/drawable-fa-mdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_3_wht.png b/res/drawable-fa-mdpi/dial_num_3_wht.png
deleted file mode 100644
index e600393..0000000
--- a/res/drawable-fa-mdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_4_wht.png b/res/drawable-fa-mdpi/dial_num_4_wht.png
deleted file mode 100644
index 7375890..0000000
--- a/res/drawable-fa-mdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_5_wht.png b/res/drawable-fa-mdpi/dial_num_5_wht.png
deleted file mode 100644
index e8a3156..0000000
--- a/res/drawable-fa-mdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_6_wht.png b/res/drawable-fa-mdpi/dial_num_6_wht.png
deleted file mode 100644
index 79cdc1c..0000000
--- a/res/drawable-fa-mdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_7_wht.png b/res/drawable-fa-mdpi/dial_num_7_wht.png
deleted file mode 100644
index 5c81896..0000000
--- a/res/drawable-fa-mdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_8_wht.png b/res/drawable-fa-mdpi/dial_num_8_wht.png
deleted file mode 100644
index 7744206..0000000
--- a/res/drawable-fa-mdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-mdpi/dial_num_9_wht.png b/res/drawable-fa-mdpi/dial_num_9_wht.png
deleted file mode 100644
index a0c488c..0000000
--- a/res/drawable-fa-mdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_0_wht.png b/res/drawable-fa-xhdpi/dial_num_0_wht.png
deleted file mode 100644
index 069afe6..0000000
--- a/res/drawable-fa-xhdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_1_wht.png b/res/drawable-fa-xhdpi/dial_num_1_wht.png
deleted file mode 100644
index b960b45..0000000
--- a/res/drawable-fa-xhdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_2_wht.png b/res/drawable-fa-xhdpi/dial_num_2_wht.png
deleted file mode 100644
index 9c6d393..0000000
--- a/res/drawable-fa-xhdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_3_wht.png b/res/drawable-fa-xhdpi/dial_num_3_wht.png
deleted file mode 100644
index 16cc930..0000000
--- a/res/drawable-fa-xhdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_4_wht.png b/res/drawable-fa-xhdpi/dial_num_4_wht.png
deleted file mode 100644
index f956a0b..0000000
--- a/res/drawable-fa-xhdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_5_wht.png b/res/drawable-fa-xhdpi/dial_num_5_wht.png
deleted file mode 100644
index da4c892..0000000
--- a/res/drawable-fa-xhdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_6_wht.png b/res/drawable-fa-xhdpi/dial_num_6_wht.png
deleted file mode 100644
index 1f7dc6a..0000000
--- a/res/drawable-fa-xhdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_7_wht.png b/res/drawable-fa-xhdpi/dial_num_7_wht.png
deleted file mode 100644
index 59be814..0000000
--- a/res/drawable-fa-xhdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_8_wht.png b/res/drawable-fa-xhdpi/dial_num_8_wht.png
deleted file mode 100644
index 30f30d2..0000000
--- a/res/drawable-fa-xhdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-fa-xhdpi/dial_num_9_wht.png b/res/drawable-fa-xhdpi/dial_num_9_wht.png
deleted file mode 100644
index 12651f3..0000000
--- a/res/drawable-fa-xhdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_background_texture.png b/res/drawable-hdpi/dial_background_texture.png
deleted file mode 100644
index 95bec9f..0000000
--- a/res/drawable-hdpi/dial_background_texture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_0_wht.png b/res/drawable-hdpi/dial_num_0_wht.png
deleted file mode 100644
index c42bf4c..0000000
--- a/res/drawable-hdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_1_wht.png b/res/drawable-hdpi/dial_num_1_wht.png
deleted file mode 100644
index 434fd33..0000000
--- a/res/drawable-hdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_2_wht.png b/res/drawable-hdpi/dial_num_2_wht.png
deleted file mode 100644
index 2ae20ab..0000000
--- a/res/drawable-hdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_3_wht.png b/res/drawable-hdpi/dial_num_3_wht.png
deleted file mode 100644
index 991d5f3..0000000
--- a/res/drawable-hdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_4_wht.png b/res/drawable-hdpi/dial_num_4_wht.png
deleted file mode 100644
index 7aad3ef..0000000
--- a/res/drawable-hdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_5_wht.png b/res/drawable-hdpi/dial_num_5_wht.png
deleted file mode 100644
index 42a1d0b..0000000
--- a/res/drawable-hdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_6_wht.png b/res/drawable-hdpi/dial_num_6_wht.png
deleted file mode 100644
index b03e019..0000000
--- a/res/drawable-hdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_7_wht.png b/res/drawable-hdpi/dial_num_7_wht.png
deleted file mode 100644
index 8b72fff..0000000
--- a/res/drawable-hdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_8_wht.png b/res/drawable-hdpi/dial_num_8_wht.png
deleted file mode 100644
index 822f21a..0000000
--- a/res/drawable-hdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_9_wht.png b/res/drawable-hdpi/dial_num_9_wht.png
deleted file mode 100644
index 2ee944b..0000000
--- a/res/drawable-hdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_pound_wht.png b/res/drawable-hdpi/dial_num_pound_wht.png
deleted file mode 100644
index e10e57d..0000000
--- a/res/drawable-hdpi/dial_num_pound_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_star_wht.png b/res/drawable-hdpi/dial_num_star_wht.png
deleted file mode 100644
index 1dfc111..0000000
--- a/res/drawable-hdpi/dial_num_star_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_ab_dialer_holo_dark.png b/res/drawable-hdpi/ic_ab_dialer_holo_dark.png
deleted file mode 100644
index 5fea91f..0000000
--- a/res/drawable-hdpi/ic_ab_dialer_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_ab_history_holo_dark.png b/res/drawable-hdpi/ic_ab_history_holo_dark.png
deleted file mode 100644
index 1edab8d..0000000
--- a/res/drawable-hdpi/ic_ab_history_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_dial_action_search.png b/res/drawable-hdpi/ic_dial_action_search.png
deleted file mode 100644
index 898ce11..0000000
--- a/res/drawable-hdpi/ic_dial_action_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_background_texture.png b/res/drawable-mdpi/dial_background_texture.png
deleted file mode 100644
index a6d666c..0000000
--- a/res/drawable-mdpi/dial_background_texture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_0_wht.png b/res/drawable-mdpi/dial_num_0_wht.png
deleted file mode 100644
index e6e295a..0000000
--- a/res/drawable-mdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_1_wht.png b/res/drawable-mdpi/dial_num_1_wht.png
deleted file mode 100644
index a640e36..0000000
--- a/res/drawable-mdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_2_wht.png b/res/drawable-mdpi/dial_num_2_wht.png
deleted file mode 100644
index e311f4f..0000000
--- a/res/drawable-mdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_3_wht.png b/res/drawable-mdpi/dial_num_3_wht.png
deleted file mode 100644
index f07324a..0000000
--- a/res/drawable-mdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_4_wht.png b/res/drawable-mdpi/dial_num_4_wht.png
deleted file mode 100644
index cd8d33c..0000000
--- a/res/drawable-mdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_5_wht.png b/res/drawable-mdpi/dial_num_5_wht.png
deleted file mode 100644
index a9f27dc..0000000
--- a/res/drawable-mdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_6_wht.png b/res/drawable-mdpi/dial_num_6_wht.png
deleted file mode 100644
index 2bdf08e..0000000
--- a/res/drawable-mdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_7_wht.png b/res/drawable-mdpi/dial_num_7_wht.png
deleted file mode 100644
index 6c1c599..0000000
--- a/res/drawable-mdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_8_wht.png b/res/drawable-mdpi/dial_num_8_wht.png
deleted file mode 100644
index db0694c..0000000
--- a/res/drawable-mdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_9_wht.png b/res/drawable-mdpi/dial_num_9_wht.png
deleted file mode 100644
index 692fdb0..0000000
--- a/res/drawable-mdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_pound_wht.png b/res/drawable-mdpi/dial_num_pound_wht.png
deleted file mode 100644
index f216d05..0000000
--- a/res/drawable-mdpi/dial_num_pound_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_star_wht.png b/res/drawable-mdpi/dial_num_star_wht.png
deleted file mode 100644
index f7e8e9f..0000000
--- a/res/drawable-mdpi/dial_num_star_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_ab_dialer_holo_dark.png b/res/drawable-mdpi/ic_ab_dialer_holo_dark.png
deleted file mode 100644
index c4cf2a1..0000000
--- a/res/drawable-mdpi/ic_ab_dialer_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_ab_history_holo_dark.png b/res/drawable-mdpi/ic_ab_history_holo_dark.png
deleted file mode 100644
index 85bf5f3..0000000
--- a/res/drawable-mdpi/ic_ab_history_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_dial_action_search.png b/res/drawable-mdpi/ic_dial_action_search.png
deleted file mode 100644
index 88cba92..0000000
--- a/res/drawable-mdpi/ic_dial_action_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_background_texture.png b/res/drawable-xhdpi/dial_background_texture.png
deleted file mode 100644
index 184049f..0000000
--- a/res/drawable-xhdpi/dial_background_texture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_0_wht.png b/res/drawable-xhdpi/dial_num_0_wht.png
deleted file mode 100644
index dca0aea..0000000
--- a/res/drawable-xhdpi/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_1_wht.png b/res/drawable-xhdpi/dial_num_1_wht.png
deleted file mode 100644
index d1535c1..0000000
--- a/res/drawable-xhdpi/dial_num_1_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_2_wht.png b/res/drawable-xhdpi/dial_num_2_wht.png
deleted file mode 100644
index 12c4ab9..0000000
--- a/res/drawable-xhdpi/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_3_wht.png b/res/drawable-xhdpi/dial_num_3_wht.png
deleted file mode 100644
index 4353e8a..0000000
--- a/res/drawable-xhdpi/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_4_wht.png b/res/drawable-xhdpi/dial_num_4_wht.png
deleted file mode 100644
index ccee5cc..0000000
--- a/res/drawable-xhdpi/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_5_wht.png b/res/drawable-xhdpi/dial_num_5_wht.png
deleted file mode 100644
index f27f153..0000000
--- a/res/drawable-xhdpi/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_6_wht.png b/res/drawable-xhdpi/dial_num_6_wht.png
deleted file mode 100644
index 8966d13..0000000
--- a/res/drawable-xhdpi/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_7_wht.png b/res/drawable-xhdpi/dial_num_7_wht.png
deleted file mode 100644
index b018810..0000000
--- a/res/drawable-xhdpi/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_8_wht.png b/res/drawable-xhdpi/dial_num_8_wht.png
deleted file mode 100644
index 7c7b4f8..0000000
--- a/res/drawable-xhdpi/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_9_wht.png b/res/drawable-xhdpi/dial_num_9_wht.png
deleted file mode 100644
index 23984f0..0000000
--- a/res/drawable-xhdpi/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_pound_wht.png b/res/drawable-xhdpi/dial_num_pound_wht.png
deleted file mode 100644
index be21af8..0000000
--- a/res/drawable-xhdpi/dial_num_pound_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_star_wht.png b/res/drawable-xhdpi/dial_num_star_wht.png
deleted file mode 100644
index 061a494..0000000
--- a/res/drawable-xhdpi/dial_num_star_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_dialer_holo_dark.png b/res/drawable-xhdpi/ic_ab_dialer_holo_dark.png
deleted file mode 100644
index a997643..0000000
--- a/res/drawable-xhdpi/ic_ab_dialer_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_history_holo_dark.png b/res/drawable-xhdpi/ic_ab_history_holo_dark.png
deleted file mode 100644
index 98cc1af..0000000
--- a/res/drawable-xhdpi/ic_ab_history_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dial_action_search.png b/res/drawable-xhdpi/ic_dial_action_search.png
deleted file mode 100644
index fe3aa24..0000000
--- a/res/drawable-xhdpi/ic_dial_action_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/dialpad_background.xml b/res/drawable/dialpad_background.xml
deleted file mode 100644
index 0e31f5e..0000000
--- a/res/drawable/dialpad_background.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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.
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/dial_background_texture"
- android:tileMode="repeat" />
diff --git a/res/drawable/ic_tab_dialer.xml b/res/drawable/ic_tab_dialer.xml
deleted file mode 100644
index 593d091..0000000
--- a/res/drawable/ic_tab_dialer.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/ic_ab_dialer_holo_dark" />
-</selector>
-
diff --git a/res/drawable/ic_tab_recent.xml b/res/drawable/ic_tab_recent.xml
deleted file mode 100644
index 203bc4f..0000000
--- a/res/drawable/ic_tab_recent.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- 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.
- -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/ic_ab_history_holo_dark" />
-</selector>
-
diff --git a/res/layout-land/dialpad_fragment.xml b/res/layout-land/dialpad_fragment.xml
deleted file mode 100644
index 658a03b..0000000
--- a/res/layout-land/dialpad_fragment.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="ltr" >
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="3"
- android:orientation="vertical" >
-
- <LinearLayout
- android:id="@+id/digits_container"
- android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="@integer/dialpad_layout_weight_digits"
- android:layout_marginTop="@dimen/dialpad_vertical_margin"
- android:background="@drawable/dialpad_background"
- android:gravity="center">
-
- <com.android.dialer.dialpad.DigitsEditText
- android:id="@+id/digits"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:layout_height="match_parent"
- android:gravity="center"
- android:textAppearance="@style/DialtactsDigitsTextAppearance"
- android:textColor="?android:attr/textColorPrimary"
- android:nextFocusRight="@+id/overflow_menu"
- android:background="@android:color/transparent" />
-
- <ImageButton
- android:id="@+id/deleteButton"
- android:layout_width="56dip"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical"
- android:gravity="center"
- android:state_enabled="false"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/description_delete_button"
- android:src="@drawable/ic_dial_action_delete" />
-
-
- </LinearLayout>
- <!-- "Dialpad chooser" UI, shown only when the user brings up the
- Dialer while a call is already in progress.
- When this UI is visible, the other Dialer elements
- (the textfield and button) are hidden. -->
- <ListView android:id="@+id/dialpadChooser"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:footerDividersEnabled="true" />
-
- <!-- Keypad section -->
- <include layout="@layout/dialpad" />
- </LinearLayout>
- <View
- android:layout_width="@dimen/dialpad_center_margin"
- android:layout_height="match_parent"
- android:background="#66000000"/>
- <RelativeLayout
- android:id="@+id/dialButtonContainer"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="2"
- android:background="@drawable/dialpad_background">
- <View
- android:layout_width="match_parent"
- android:layout_height="@dimen/dialpad_button_margin"
- android:layout_above="@id/dialButton"
- android:background="#33000000" />
- <ImageButton android:id="@+id/dialButton"
- android:layout_width="match_parent"
- android:layout_height="@dimen/call_button_height"
- android:layout_alignParentBottom="true"
- android:state_enabled="false"
- android:background="@drawable/btn_call"
- android:contentDescription="@string/description_dial_button"
- android:src="@drawable/ic_dial_action_call" />
- </RelativeLayout>
-</LinearLayout>
diff --git a/res/layout-land/dialtacts_activity.xml b/res/layout/all_contacts_activity.xml
similarity index 71%
rename from res/layout-land/dialtacts_activity.xml
rename to res/layout/all_contacts_activity.xml
index f43fe5f..a913027 100644
--- a/res/layout-land/dialtacts_activity.xml
+++ b/res/layout/all_contacts_activity.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
+<!-- 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.
@@ -18,10 +18,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?android:attr/actionBarSize"
- android:id="@+id/dialtacts_frame"
- >
- <android.support.v4.view.ViewPager
- android:id="@+id/pager"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:id="@+id/all_contacts_frame">
+ <fragment android:name="com.android.dialer.list.AllContactsFragment"
+ android:id="@+id/all_contacts_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</FrameLayout>
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml
index f9a0785..60240bc 100644
--- a/res/layout/dialpad.xml
+++ b/res/layout/dialpad.xml
@@ -26,74 +26,86 @@
android:paddingStart="5dip"
android:paddingEnd="5dip"
android:paddingBottom="10dip"
- android:background="@drawable/dialpad_background"
+ 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/dialpad_chooser_list_item.xml b/res/layout/dialpad_chooser_list_item.xml
index 853ca47..5ba88ca 100644
--- a/res/layout/dialpad_chooser_list_item.xml
+++ b/res/layout/dialpad_chooser_list_item.xml
@@ -4,9 +4,9 @@
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.
@@ -27,6 +27,7 @@
<TextView android:id="@+id/text"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/dialpad_text_color"
android:layout_gravity="center_vertical"
android:layout_width="0dip"
android:layout_weight="1"
diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml
index f3bd2a2..b79214a 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -13,108 +13,110 @@
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/top"
+<view class="com.android.dialer.dialpad.DialpadFragment$DialpadSlidingLinearLayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingStart="@dimen/dialpad_horizontal_margin"
- android:paddingEnd="@dimen/dialpad_horizontal_margin"
- android:layoutDirection="ltr" >
-
- <!-- Text field and possibly soft menu button above the keypad where
- the digits are displayed. -->
+ android:orientation="vertical" >
+ <!-- spacer view -->
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
<LinearLayout
- android:id="@+id/digits_container"
+ android:id="@+id/top"
android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="@integer/dialpad_layout_weight_digits"
- android:layout_marginTop="@dimen/dialpad_vertical_margin"
- android:gravity="center"
- android:background="@drawable/dialpad_background" >
+ android:layout_height="0dp"
+ android:layout_weight="2"
+ android:orientation="vertical"
+ android:paddingStart="@dimen/dialpad_horizontal_margin"
+ android:paddingEnd="@dimen/dialpad_horizontal_margin"
+ android:layoutDirection="ltr"
+ android:background="@color/background_dialpad" >
- <com.android.dialer.dialpad.DigitsEditText
- android:id="@+id/digits"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:layout_height="match_parent"
- android:gravity="center"
- android:textAppearance="@style/DialtactsDigitsTextAppearance"
- android:textColor="?android:attr/textColorPrimary"
- android:nextFocusRight="@+id/overflow_menu"
- android:background="@android:color/transparent" />
- <ImageButton
- android:id="@+id/deleteButton"
- android:layout_width="56dip"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical"
- android:gravity="center"
- android:state_enabled="false"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/description_delete_button"
- android:src="@drawable/ic_dial_action_delete" />
- </LinearLayout>
-
- <!-- Smart dial suggestion section.
- sp is used here for this layout instead of dp in order for it to resize as
- appropriate when the font size increases. This is a one-time exception that is
- ok in this case because there is space for the suggestion strip to expand. -->
- <RelativeLayout
- android:id="@+id/dialpad_smartdial_container"
- android:layout_width="match_parent"
- android:layout_height="50sp"
- android:layout_marginTop="@dimen/dialpad_vertical_margin">
- <View
- android:id="@+id/dialpad_smartdial_list_background"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/dialpad_background">
- </View>
+ <!-- Text field and possibly soft menu button above the keypad where
+ the digits are displayed. -->
<LinearLayout
- android:id="@+id/dialpad_smartdial_list"
+ android:id="@+id/digits_container"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- android:gravity="center">
+ android:layout_height="0px"
+ android:layout_weight="@integer/dialpad_layout_weight_digits_new"
+ android:layout_marginTop="@dimen/dialpad_vertical_margin"
+ android:gravity="center" >
+
+ <com.android.dialer.dialpad.DigitsEditText
+ android:id="@+id/digits"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:textAppearance="@style/DialtactsDigitsTextAppearance"
+ android:textColor="@color/dialpad_text_color"
+ android:nextFocusRight="@+id/overflow_menu"
+ android:background="@android:color/transparent" />
+
+ <ImageButton
+ android:id="@+id/deleteButton"
+ android:layout_width="56dip"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:gravity="center"
+ android:state_enabled="false"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@string/description_delete_button"
+ android:src="@drawable/ic_dial_action_delete" />
</LinearLayout>
- </RelativeLayout>
- <!-- Keypad section -->
- <include layout="@layout/dialpad" />
+ <!-- Keypad section -->
+ <include layout="@layout/dialpad" />
- <View style="@style/DialpadHorizontalSeparator"/>
+ <View style="@style/DialpadHorizontalSeparator"/>
- <!-- left and right paddings will be modified by the code. See DialpadFragment. -->
- <FrameLayout
- android:id="@+id/dialButtonContainer"
- android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="@integer/dialpad_layout_weight_additional_buttons"
- android:layout_gravity="center_horizontal"
- android:background="@drawable/dialpad_background">
-
- <ImageButton
- android:id="@+id/dialButton"
+ <LinearLayout
+ android:id="@+id/dialButtonContainer"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:state_enabled="false"
- android:background="@drawable/btn_call"
- android:contentDescription="@string/description_dial_button"
- android:src="@drawable/ic_dial_action_call" />
+ android:layout_height="0px"
+ android:layout_weight="@integer/dialpad_layout_weight_additional_buttons"
+ android:layout_gravity="center_horizontal"
+ android:background="@color/dialpad_primary_text_color">
+ <ImageButton
+ android:id="@+id/call_history_on_dialpad_button"
+ android:layout_height="match_parent"
+ android:layout_width="@dimen/fake_menu_button_min_width"
+ android:layout_gravity="bottom|start"
+ android:background="@drawable/btn_call"
+ android:contentDescription="@string/action_menu_call_history_description"
+ android:src="@drawable/ic_menu_history_lt"/>
+ <ImageButton
+ android:id="@+id/dialButton"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:state_enabled="false"
+ android:background="@drawable/btn_call"
+ android:contentDescription="@string/description_dial_button"
+ android:src="@drawable/ic_dial_action_call" />
+ <ImageButton
+ android:id="@+id/overflow_menu_on_dialpad"
+ android:layout_height="match_parent"
+ android:layout_width="@dimen/fake_menu_button_min_width"
+ android:layout_gravity="bottom|end"
+ android:background="@drawable/btn_call"
+ android:src="@drawable/ic_menu_overflow_lt"
+ android:contentDescription="@string/action_menu_overflow_description" />
+ </LinearLayout>
- </FrameLayout>
+ <!-- "Dialpad chooser" UI, shown only when the user brings up the
+ Dialer while a call is already in progress.
+ When this UI is visible, the other Dialer elements
+ (the textfield/button and the dialpad) are hidden. -->
+ <ListView android:id="@+id/dialpadChooser"
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:layout_weight="1"
+ />
- <!-- "Dialpad chooser" UI, shown only when the user brings up the
- Dialer while a call is already in progress.
- When this UI is visible, the other Dialer elements
- (the textfield/button and the dialpad) are hidden. -->
- <ListView android:id="@+id/dialpadChooser"
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_weight="1"
- />
-
-</LinearLayout>
+ </LinearLayout>
+</view>
diff --git a/res/layout/dialpad_smartdial_item.xml b/res/layout/dialpad_smartdial_item.xml
deleted file mode 100644
index 32d801e..0000000
--- a/res/layout/dialpad_smartdial_item.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="match_parent"
- android:layout_marginTop="2dp"
- android:layout_marginBottom="2dp"
- android:background="?android:attr/selectableItemBackground">
-
- <com.android.dialer.dialpad.SmartDialTextView
- android:id="@+id/contact_name"
- android:layout_width="match_parent"
- android:layout_height="28sp"
- android:padding="@dimen/smartdial_suggestions_padding"
- android:textColor="@color/smartdial_name_primary_text_color"
- android:textSize="16sp"
- android:singleLine="true"
- android:ellipsize="none"
- android:gravity="center"
- />
- <com.android.dialer.dialpad.SmartDialTextView
- android:id="@+id/contact_number"
- android:layout_width="match_parent"
- android:layout_height="16sp"
- android:textColor="@color/smartdial_number_primary_text_color"
- android:textSize="13sp"
- android:gravity="center"
- />
-</LinearLayout>
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 079ce37..580e0bf 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 The Android Open Source Project
+<!-- 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.
@@ -13,35 +13,66 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
- android:id="@+id/dialtacts_frame"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:clipChildren="false"
+ android:id="@+id/dialtacts_container"
>
- <android.support.v4.view.ViewPager
- android:id="@+id/pager"
+ <!-- Overlapping dialpad fragment is inserted here -->
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- <ImageButton
- android:id="@+id/searchButton"
- android:layout_width="wrap_content"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="bottom|start"
- android:state_enabled="false"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/description_search_button"
- android:src="@drawable/ic_dial_action_search"/>
-
- <ImageButton
- android:id="@+id/overflow_menu"
- android:layout_width="wrap_content"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="bottom|end"
- android:src="@drawable/ic_menu_overflow"
- android:contentDescription="@string/action_menu_overflow_description"
- android:nextFocusLeft="@id/digits"
- android:background="?android:attr/selectableItemBackground"/>
+ android:layout_height="match_parent"
+ android:clipChildren="false"
+ android:orientation="vertical" >
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="16dp"
+ android:paddingRight="23dp"
+ android:id="@+id/search_view_container"
+ android:background="@color/searchbox_background_color"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+ <EditText
+ android:id="@+id/search_view"
+ android:layout_width="0dp"
+ android:layout_height="56dp"
+ android:layout_weight="1"
+ android:inputType="textFilter"/>
+ <ImageView
+ android:id="@+id/search_close_button"
+ android:layout_height="40dp"
+ 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"
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:id="@+id/dialtacts_frame"
+ android:clipChildren="false">
+ </FrameLayout>
+ <View
+ android:id="@+id/dialtacts_bottom_padding"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:visibility="gone" />
+ </LinearLayout>
</FrameLayout>
diff --git a/res/layout/dialtacts_custom_action_bar.xml b/res/layout/dialtacts_custom_action_bar.xml
deleted file mode 100644
index c62e225..0000000
--- a/res/layout/dialtacts_custom_action_bar.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?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.
--->
-
-<!-- Dimensions are set at runtime in ActionBarAdapter -->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="0dip"
- android:layout_height="0dip"
- android:orientation="horizontal">
-
- <SearchView
- android:id="@+id/search_view"
- android:layout_width="0px"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:iconifiedByDefault="false"
- android:inputType="textFilter" />
-
- <ImageButton
- android:id="@+id/search_option"
- android:layout_width="wrap_content"
- android:paddingStart="4dip"
- android:paddingEnd="4dip"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:contentDescription="@string/action_menu_overflow_description"
- android:importantForAccessibility="yes"
- android:src="@drawable/ic_menu_overflow"
- android:background="?android:attr/selectableItemBackground"
- android:visibility="gone" />
-
-</LinearLayout>
diff --git a/res/layout/empty2.xml b/res/layout/empty2.xml
deleted file mode 100644
index 349dcfa..0000000
--- a/res/layout/empty2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<!-- Hack for show empty hidden menu item without using android:icon.
- See dialtact_options.xml for more detail.
-
- TODO: figure out better way -->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_dial_action_search"
- android:visibility="invisible"/>
-</FrameLayout>
diff --git a/res/layout/new_dialpad.xml b/res/layout/new_dialpad.xml
deleted file mode 100644
index 60240bc..0000000
--- a/res/layout/new_dialpad.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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.
--->
-
-<!-- Dialpad in the Phone app. -->
-<TableLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/dialpad"
- android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="@integer/dialpad_layout_weight_dialpad"
- android:layout_gravity="center_horizontal"
- android:layout_marginTop="@dimen/dialpad_vertical_margin"
- 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.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">
- <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">
- <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.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
deleted file mode 100644
index f5565c7..0000000
--- a/res/layout/new_dialpad_fragment.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<view class="com.android.dialer.dialpad.DialpadFragment$DialpadSlidingLinearLayout"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
- <!-- spacer view -->
- <Space
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
- <LinearLayout
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="2"
- android:orientation="vertical"
- android:paddingStart="@dimen/dialpad_horizontal_margin"
- android:paddingEnd="@dimen/dialpad_horizontal_margin"
- android:layoutDirection="ltr"
- android:background="@color/background_dialpad" >
-
-
- <!-- Text field and possibly soft menu button above the keypad where
- the digits are displayed. -->
- <LinearLayout
- android:id="@+id/digits_container"
- android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="@integer/dialpad_layout_weight_digits_new"
- android:layout_marginTop="@dimen/dialpad_vertical_margin"
- android:gravity="center" >
-
- <com.android.dialer.dialpad.DigitsEditText
- android:id="@+id/digits"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:layout_height="match_parent"
- android:gravity="center"
- android:textAppearance="@style/DialtactsDigitsTextAppearance"
- android:textColor="@color/dialpad_text_color"
- android:nextFocusRight="@+id/overflow_menu"
- android:background="@android:color/transparent" />
-
- <ImageButton
- android:id="@+id/deleteButton"
- android:layout_width="56dip"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical"
- android:gravity="center"
- android:state_enabled="false"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/description_delete_button"
- android:src="@drawable/ic_dial_action_delete" />
- </LinearLayout>
-
- <!-- Keypad section -->
- <include layout="@layout/new_dialpad" />
-
- <View style="@style/DialpadHorizontalSeparator"/>
-
- <LinearLayout
- android:id="@+id/dialButtonContainer"
- android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="@integer/dialpad_layout_weight_additional_buttons"
- android:layout_gravity="center_horizontal"
- android:background="@color/dialpad_primary_text_color">
- <ImageButton
- android:id="@+id/call_history_on_dialpad_button"
- android:layout_height="@dimen/fake_action_bar_height"
- android:layout_width="@dimen/fake_menu_button_min_width"
- android:layout_gravity="bottom|start"
- android:background="@drawable/btn_call"
- android:contentDescription="@string/action_menu_call_history_description"
- android:src="@drawable/ic_menu_history_lt"/>
- <ImageButton
- android:id="@+id/dialButton"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:state_enabled="false"
- android:background="@drawable/btn_call"
- android:contentDescription="@string/description_dial_button"
- android:src="@drawable/ic_dial_action_call" />
- <ImageButton
- android:id="@+id/overflow_menu_on_dialpad"
- android:layout_height="@dimen/fake_action_bar_height"
- android:layout_width="@dimen/fake_menu_button_min_width"
- android:layout_gravity="bottom|end"
- android:background="@drawable/btn_call"
- android:src="@drawable/ic_menu_overflow_lt"
- android:contentDescription="@string/action_menu_overflow_description" />
- </LinearLayout>
-
- <!-- "Dialpad chooser" UI, shown only when the user brings up the
- Dialer while a call is already in progress.
- When this UI is visible, the other Dialer elements
- (the textfield/button and the dialpad) are hidden. -->
- <ListView android:id="@+id/dialpadChooser"
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_weight="1"
- />
-
- </LinearLayout>
-</view>
diff --git a/res/layout/new_dialtacts_activity.xml b/res/layout/new_dialtacts_activity.xml
deleted file mode 100644
index b9d417b..0000000
--- a/res/layout/new_dialtacts_activity.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?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.
--->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:clipChildren="false"
- android:id="@+id/dialtacts_container"
- >
- <!-- Overlapping dialpad fragment is inserted here -->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:clipChildren="false"
- android:orientation="vertical" >
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="16dp"
- android:paddingRight="23dp"
- android:id="@+id/search_view_container"
- android:background="@color/searchbox_background_color"
- android:orientation="horizontal"
- android:gravity="center_vertical">
- <EditText
- android:id="@+id/search_view"
- android:layout_width="0dp"
- android:layout_height="56dp"
- android:layout_weight="1"
- android:inputType="textFilter"/>
- <ImageView
- android:id="@+id/search_close_button"
- android:layout_height="40dp"
- 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"
- android:layout_weight="1"
- android:layout_width="match_parent"
- android:id="@id/dialtacts_frame"
- android:clipChildren="false">
- </FrameLayout>
- <View
- android:id="@+id/dialtacts_bottom_padding"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:visibility="gone" />
- </LinearLayout>
-</FrameLayout>
diff --git a/res/layout/phone_contact_tile_list.xml b/res/layout/phone_contact_tile_list.xml
deleted file mode 100644
index 8931cf6..0000000
--- a/res/layout/phone_contact_tile_list.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<!-- Use LinearLayout + FrameLayout, just to rely on android:divider and android:showDividers -->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/FragmentActionBarPadding"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:divider="?android:attr/dividerHorizontal"
- android:showDividers="end">
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <ListView
- android:id="@+id/contact_tile_list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingTop="@dimen/contact_tile_list_padding_top"
- android:clipToPadding="false"
- android:fadingEdge="none"
- android:divider="@null" />
-
- <TextView
- android:id="@+id/contact_tile_list_empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_marginTop="@dimen/empty_message_top_margin"
- android:textColor="?android:attr/textColorSecondary"
- android:textAppearance="?android:attr/textAppearanceLarge"/>
- </FrameLayout>
-</LinearLayout>
diff --git a/res/layout/new_phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml
similarity index 100%
rename from res/layout/new_phone_favorites_fragment.xml
rename to res/layout/phone_favorites_fragment.xml
diff --git a/res/layout/show_all_contacts_fragment.xml b/res/layout/show_all_contacts_fragment.xml
index 0a95f27..14fe340 100644
--- a/res/layout/show_all_contacts_fragment.xml
+++ b/res/layout/show_all_contacts_fragment.xml
@@ -19,8 +19,7 @@
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">
+ android:layout_height="match_parent">
<!-- Shown only when an Account filter is set.
- paddingTop should be here to show "shade" effect correctly. -->
@@ -35,7 +34,7 @@
android:layout_weight="1" >
<view
class="com.android.contacts.common.list.PinnedHeaderListView"
- style="@style/NewDialtactsTheme"
+ style="@style/DialtactsTheme"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/menu/call_log_options.xml b/res/menu/call_log_options.xml
index bf2973f..50b1cad 100644
--- a/res/menu/call_log_options.xml
+++ b/res/menu/call_log_options.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!-- 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.
@@ -14,38 +14,6 @@
limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item
- android:id="@+id/show_all_calls"
- android:title="@string/menu_show_all_calls"
- android:showAsAction="never"
- android:orderInCategory="1"/>
-
- <item
- android:id="@+id/show_voicemails_only"
- android:title="@string/menu_show_voicemails_only"
- android:showAsAction="never"
- android:orderInCategory="1"/>
-
- <item
- android:id="@+id/show_missed_only"
- android:title="@string/menu_show_missed_only"
- android:showAsAction="never"
- android:orderInCategory="1"/>
-
- <item
- android:id="@+id/show_outgoing_only"
- android:title="@string/menu_show_outgoing_only"
- android:showAsAction="never"
- android:orderInCategory="1"/>
-
- <item
- android:id="@+id/show_incoming_only"
- android:title="@string/menu_show_incoming_only"
- android:showAsAction="never"
- android:orderInCategory="1"/>
-
-
<item
android:id="@+id/delete_all"
android:title="@string/recentCalls_deleteAll"
diff --git a/res/menu/call_log_options_new.xml b/res/menu/call_log_options_new.xml
deleted file mode 100644
index 50b1cad..0000000
--- a/res/menu/call_log_options_new.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:id="@+id/delete_all"
- android:title="@string/recentCalls_deleteAll"
- android:showAsAction="never"
- android:orderInCategory="1"/>
-</menu>
diff --git a/res/menu/dialpad_options.xml b/res/menu/dialpad_options.xml
index 6dda8fc..0727dd5 100644
--- a/res/menu/dialpad_options.xml
+++ b/res/menu/dialpad_options.xml
@@ -24,16 +24,9 @@
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" />
-
- <item
- android:id="@+id/menu_call_settings_dialpad"
- android:title="@string/call_settings"
- android:showAsAction="withText"
- android:orderInCategory="1" />
</menu>
diff --git a/res/menu/dialpad_options_new.xml b/res/menu/dialpad_options_new.xml
deleted file mode 100644
index 0727dd5..0000000
--- a/res/menu/dialpad_options_new.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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.xml b/res/menu/dialtacts_options.xml
index 8eaa915..b306979 100644
--- a/res/menu/dialtacts_options.xml
+++ b/res/menu/dialtacts_options.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!-- 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.
@@ -15,38 +15,16 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
- android:id="@+id/search_on_action_bar"
- android:title="@string/menu_search"
- android:icon="@drawable/ic_dial_action_search"
- android:showAsAction="ifRoom" />
-
- <!-- This should come after the other menus in CallLog and Dialpad -->
+ android:id="@+id/menu_import_export"
+ android:title="@string/menu_import_export" />
+ <item
+ android:id="@+id/menu_clear_frequents"
+ android:title="@string/menu_clear_frequents" />
+ <item
+ android:id="@+id/add_contact"
+ android:title="@string/menu_newContact"/>
<item
android:id="@+id/menu_call_settings"
android:title="@string/call_settings"
- android:showAsAction="withText"
android:orderInCategory="2" />
-
- <item
- android:id="@+id/filter_option"
- android:title="@string/menu_contacts_filter"
- android:showAsAction="withText" />
-
- <item
- android:id="@+id/add_contact"
- android:icon="@drawable/ic_add_contact_holo_dark"
- android:title="@string/menu_newContact"
- android:showAsAction="ifRoom" />
-
- <!-- Ugly hack: empty item never clickable.
- This is for forcing search icon on left even when there's a single item
- in the bottom ActionBar.
- We intentionally don't use android:icon to avoid other issues around item with
- a null icon.
-
- TODO: look for better idea. -->
- <item
- android:id="@+id/empty_right_menu_item"
- android:actionLayout="@layout/empty2"
- android:showAsAction="ifRoom" />
</menu>
diff --git a/res/menu/dialtacts_options_new.xml b/res/menu/dialtacts_options_new.xml
deleted file mode 100644
index b306979..0000000
--- a/res/menu/dialtacts_options_new.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:id="@+id/menu_import_export"
- android:title="@string/menu_import_export" />
- <item
- android:id="@+id/menu_clear_frequents"
- android:title="@string/menu_clear_frequents" />
- <item
- android:id="@+id/add_contact"
- android:title="@string/menu_newContact"/>
- <item
- android:id="@+id/menu_call_settings"
- android:title="@string/call_settings"
- android:orderInCategory="2" />
-</menu>
diff --git a/res/menu/dialtacts_search_options.xml b/res/menu/dialtacts_search_options.xml
deleted file mode 100644
index 0979ebb..0000000
--- a/res/menu/dialtacts_search_options.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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.
--->
-<!-- Used with DialtactsActivity's search mode. -->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:id="@+id/filter_option"
- android:title="@string/menu_contacts_filter"
- android:showAsAction="withText" />
- <item
- android:id="@+id/add_contact"
- android:title="@string/menu_newContact"
- android:showAsAction="withText" />
-</menu>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 085817e..94ad947 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -20,10 +20,6 @@
<color name="dialtacts_primary_text_color">#111111</color>
<color name="dialtacts_secondary_text_color">#888888</color>
<color name="dialpad_text_color">#ffffff</color>
- <color name="smartdial_name_primary_text_color">#0099cc</color>
- <color name="smartdial_name_highlighted_text_color">#39c9ff</color>
- <color name="smartdial_number_primary_text_color">#bbbbbb</color>
- <color name="smartdial_number_highlighted_text_color">#ffffff</color>
<!-- Color of the text describing an unconsumed missed call. -->
<color name="call_log_missed_call_highlight_color">#FF0000</color>
@@ -31,9 +27,6 @@
<!-- Color of the text describing an unconsumed voicemail. -->
<color name="call_log_voicemail_highlight_color">#33b5e5</color>
- <!-- Colour background for the voicemail playback ui. -->
- <color name="voicemail_playback_ui_background">@android:color/black</color>
-
<!-- Colour of voicemail progress bar to the right of position indicator.
Same as the background color of the dialer -->
<color name="voicemail_playback_seek_bar_yet_to_play">#cecece</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 7b4c65e..e03e919 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -58,11 +58,6 @@
<!-- Min with of fake menu buttons, which should be same as ActionBar's one -->
<dimen name="fake_menu_button_min_width">56dp</dimen>
- <!-- Smart Dial -->
- <dimen name="smartdial_suggestions_padding">4dp</dimen>
- <dimen name="smartdial_suggestions_extra_padding">2dp</dimen>
- <dimen name="smartdial_confidence_hint_text_size">27dp</dimen>
-
<!-- Favorites tile and recent call log padding -->
<dimen name="contact_tile_divider_padding">3dp</dimen>
<dimen name="contact_tile_info_button_height_and_width">36dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 307d56b..6ea6db6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -119,12 +119,6 @@
<!-- Message to display if we fail to get content within a suitable time period. [CHAR LIMIT=40] -->
<string name="voicemail_fetching_timout">Couldn\'t fetch voicemail.</string>
- <!-- The header in the call log used to identify missed calls and voicemail that have not yet been consumed [CHAR LIMIT=10] -->
- <string name="call_log_new_header">New</string>
-
- <!-- The header in the call log used to identify items that have been already consumed [CHAR LIMIT=10] -->
- <string name="call_log_old_header">Older</string>
-
<!-- The header to show that call log is only showing voicemail calls. [CHAR LIMIT=40] -->
<string name="call_log_voicemail_header">Calls with voicemail only</string>
@@ -553,52 +547,53 @@
<!-- Title of activity that displays a list of all calls -->
<string name="call_log_activity_title">History</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 0 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_0_number">0</string>
- <!-- Do not translate. -->
- <string name="dialpad_0_letters">+</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 1 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_1_number">1</string>
- <!-- Do not translate. -->
- <string name="dialpad_1_letters"></string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 2 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_2_number">2</string>
- <!-- Do not translate. -->
- <string name="dialpad_2_letters">ABC</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 3 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_3_number">3</string>
- <!-- Do not translate. -->
- <string name="dialpad_3_letters">DEF</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 4 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_4_number">4</string>
- <!-- Do not translate. -->
- <string name="dialpad_4_letters">GHI</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 5 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_5_number">5</string>
- <!-- Do not translate. -->
- <string name="dialpad_5_letters">JKL</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 6 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_6_number">6</string>
- <!-- Do not translate. -->
- <string name="dialpad_6_letters">MNO</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 7 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_7_number">7</string>
- <!-- Do not translate. -->
- <string name="dialpad_7_letters">PQRS</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 8 key of the dialpad [CHAR LIMIT=1]-->
<string name="dialpad_8_number">8</string>
- <!-- Do not translate. -->
- <string name="dialpad_8_letters">TUV</string>
- <!-- Do not translate. -->
+ <!-- The digit to be displayed on the 9 key of the dialpad [CHAR LIMIT=1]-->
<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_0_letters">+</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_1_letters"></string>
+ <!-- Do not translate. -->
+ <string name="dialpad_2_letters">ABC</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_3_letters">DEF</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_4_letters">GHI</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_5_letters">JKL</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_6_letters">MNO</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_7_letters">PQRS</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_8_letters">TUV</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_9_letters">WXYZ</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_star_letters"></string>
<!-- Do not translate. -->
<string name="dialpad_pound_letters"></string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 0805dd8..aab1c53 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -16,56 +16,6 @@
-->
<resources>
<style name="DialtactsTheme"
- parent="android:Theme.Holo">
- <item name="android:textColorSecondary">@color/dialtacts_secondary_text_color</item>
- <item name="android:windowActionBarOverlay">true</item>
- <item name="android:actionBarStyle">@style/DialtactsActionBarStyle</item>
- <item name="android:windowContentOverlay">@null</item>
- <item name="android:windowBackground">@drawable/background_dial_holo_dark</item>
- <item name="android:listViewStyle">@style/ListViewStyle</item>
- <item name="activated_background">@drawable/list_item_activated_background</item>
- <item name="section_header_background">@drawable/list_title_holo</item>
- <item name="list_section_header_height">32dip</item>
- <item name="list_item_divider">?android:attr/listDivider</item>
- <item name="list_item_padding_top">0dip</item>
- <item name="list_item_padding_right">0dip</item>
- <item name="list_item_padding_bottom">0dip</item>
- <item name="list_item_padding_left">0dip</item>
- <item name="list_item_gap_between_image_and_text">8dip</item>
- <item name="list_item_gap_between_label_and_data">5dip</item>
- <item name="list_item_presence_icon_margin">4dip</item>
- <item name="list_item_presence_icon_size">16dip</item>
- <item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item>
- <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_data_width_weight">5</item>
- <item name="list_item_label_width_weight">3</item>
- <item name="contact_browser_list_padding_left">16dip</item>
- <item name="contact_browser_list_padding_right">0dip</item>
- <item name="contact_browser_background">@android:color/transparent</item>
- <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
- <!-- CallLog -->
- <item name="call_log_primary_text_color">#FFFFFF</item>
- <item name="call_log_primary_background_color">#000000</item>
- <item name="call_log_secondary_text_color">#888888</item>
- <item name="call_log_secondary_background_color">#333333</item>
- <item name="call_log_header_color">#33b5e5</item>
- <!-- VoicemailStatus -->
- <item name="call_log_voicemail_status_height">48dip</item>
- <item name="call_log_voicemail_status_background_color">#262626</item>
- <item name="call_log_voicemail_status_text_color">#888888</item>
- <item name="call_log_voicemail_status_action_text_color">#33b5e5</item>
- <!-- Favorites -->
- <item name="favorites_padding_bottom">?android:attr/actionBarSize</item>
- </style>
-
- <style name="NewDialtactsTheme"
parent="android:Theme.Holo.Light">
<item name="android:textColorPrimary">@color/dialtacts_primary_text_color</item>
<item name="android:textColorSecondary">@color/dialtacts_secondary_text_color</item>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 89e5b5a..8381c8d 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -71,9 +71,9 @@
import com.android.dialer.dialpad.DialpadFragment;
import com.android.dialer.dialpad.SmartDialNameMatcher;
import com.android.dialer.interactions.PhoneNumberInteraction;
-import com.android.dialer.list.NewPhoneFavoriteFragment;
+import com.android.dialer.list.AllContactsActivity;
+import com.android.dialer.list.PhoneFavoriteFragment;
import com.android.dialer.list.OnListFragmentScrolledListener;
-import com.android.dialer.list.ShowAllContactsFragment;
import com.android.dialer.list.SmartDialSearchFragment;
import com.android.internal.telephony.ITelephony;
@@ -81,15 +81,13 @@
/**
* The dialer tab's title is 'phone', a more common name (see strings.xml).
- *
- * TODO krelease: All classes currently prefixed with New will replace the original classes or
- * be renamed more appropriately before shipping.
*/
public class DialtactsActivity extends TransactionSafeActivity implements View.OnClickListener,
DialpadFragment.OnDialpadQueryChangedListener, PopupMenu.OnMenuItemClickListener,
OnListFragmentScrolledListener,
- NewPhoneFavoriteFragment.OnPhoneFavoriteFragmentStartedListener,
- DialpadFragment.OnDialpadFragmentStartedListener {
+ PhoneFavoriteFragment.OnPhoneFavoriteFragmentStartedListener,
+ DialpadFragment.OnDialpadFragmentStartedListener,
+ PhoneFavoriteFragment.OnShowAllContactsListener {
private static final String TAG = "DialtactsActivity";
public static final boolean DEBUG = false;
@@ -124,7 +122,7 @@
/**
* The main fragment displaying the user's favorites and frequent contacts
*/
- private NewPhoneFavoriteFragment mPhoneFavoriteFragment;
+ private PhoneFavoriteFragment mPhoneFavoriteFragment;
/**
* Fragment containing the dialpad that slides into view
@@ -134,15 +132,13 @@
/**
* Fragment for searching phone numbers using the alphanumeric keyboard.
*/
- private NewSearchFragment mRegularSearchFragment;
+ private SearchFragment mRegularSearchFragment;
/**
* Fragment for searching phone numbers using the dialpad.
*/
private SmartDialSearchFragment mSmartDialSearchFragment;
- private ShowAllContactsFragment mShowAllContactsFragment;
-
private View mMenuButton;
private View mCallHistoryButton;
private View mDialpadButton;
@@ -246,27 +242,23 @@
final Intent intent = getIntent();
fixIntent(intent);
- setContentView(R.layout.new_dialtacts_activity);
+ setContentView(R.layout.dialtacts_activity);
getActionBar().hide();
if (savedInstanceState == null) {
- mPhoneFavoriteFragment = new NewPhoneFavoriteFragment();
+ mPhoneFavoriteFragment = new PhoneFavoriteFragment();
mPhoneFavoriteFragment.setListener(mPhoneFavoriteListener);
- mRegularSearchFragment = new NewSearchFragment();
+ mRegularSearchFragment = new SearchFragment();
mSmartDialSearchFragment = new SmartDialSearchFragment();
mDialpadFragment = new DialpadFragment();
- 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_frame, mShowAllContactsFragment, TAG_SHOW_ALL_CONTACTS_FRAGMENT);
ft.add(R.id.dialtacts_container, mDialpadFragment, TAG_DIALPAD_FRAGMENT);
ft.commit();
}
@@ -284,11 +276,11 @@
protected void onResume() {
super.onResume();
final FragmentManager fm = getFragmentManager();
- mPhoneFavoriteFragment = (NewPhoneFavoriteFragment) fm.findFragmentByTag(
+ mPhoneFavoriteFragment = (PhoneFavoriteFragment) fm.findFragmentByTag(
TAG_FAVORITES_FRAGMENT);
mDialpadFragment = (DialpadFragment) fm.findFragmentByTag(TAG_DIALPAD_FRAGMENT);
- mRegularSearchFragment = (NewSearchFragment) fm.findFragmentByTag(
+ mRegularSearchFragment = (SearchFragment) fm.findFragmentByTag(
TAG_REGULAR_SEARCH_FRAGMENT);
mRegularSearchFragment.setOnPhoneNumberPickerActionListener(
mPhoneNumberPickerActionListener);
@@ -298,11 +290,6 @@
mSmartDialSearchFragment.setOnPhoneNumberPickerActionListener(
mPhoneNumberPickerActionListener);
- mShowAllContactsFragment = (ShowAllContactsFragment) fm.findFragmentByTag(
- TAG_SHOW_ALL_CONTACTS_FRAGMENT);
- mShowAllContactsFragment.setOnPhoneNumberPickerActionListener(
- mPhoneNumberPickerActionListener);
-
if (mFirstLaunch) {
displayFragment(getIntent());
}
@@ -311,9 +298,8 @@
@Override
public void onAttachFragment(Fragment fragment) {
- if (fragment instanceof DialpadFragment || fragment instanceof NewSearchFragment
- || fragment instanceof SmartDialSearchFragment
- || fragment instanceof ShowAllContactsFragment) {
+ if (fragment instanceof DialpadFragment || fragment instanceof SearchFragment
+ || fragment instanceof SmartDialSearchFragment) {
final FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.hide(fragment);
transaction.commit();
@@ -323,16 +309,6 @@
}
@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
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_import_export:
@@ -369,7 +345,9 @@
case R.id.overflow_menu: {
final PopupMenu popupMenu = new PopupMenu(DialtactsActivity.this, view);
final Menu menu = popupMenu.getMenu();
- popupMenu.inflate(R.menu.dialtacts_options_new);
+ popupMenu.inflate(R.menu.dialtacts_options);
+ final MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents);
+ clearFrequents.setVisible(mPhoneFavoriteFragment.hasFrequents());
popupMenu.setOnMenuItemClickListener(this);
popupMenu.show();
break;
@@ -379,9 +357,8 @@
break;
case R.id.call_history_on_dialpad_button:
case R.id.call_history_button:
- // TODO krelease: This should start an intent with content type
- // CallLog.Calls.CONTENT_TYPE, once the intent filters for the call log activity
- // is enabled
+ // Use explicit CallLogActivity intent instead of ACTION_VIEW +
+ // CONTENT_TYPE, so that we always open our call log from our dialer
final Intent intent = new Intent(this, CallLogActivity.class);
startActivity(intent);
break;
@@ -422,15 +399,19 @@
}
private void showDialpadFragment(boolean animate) {
+ mDialpadFragment.setAdjustTranslationForAnimation(animate);
final FragmentTransaction ft = getFragmentManager().beginTransaction();
if (animate) {
ft.setCustomAnimations(R.anim.slide_in, 0);
+ } else {
+ mDialpadFragment.setYFraction(0);
}
ft.show(mDialpadFragment);
ft.commit();
}
private void hideDialpadFragment(boolean animate) {
+ mDialpadFragment.setAdjustTranslationForAnimation(animate);
final FragmentTransaction ft = getFragmentManager().beginTransaction();
if (animate) {
ft.setCustomAnimations(0, R.anim.slide_out);
@@ -439,23 +420,6 @@
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);
@@ -606,9 +570,6 @@
* @param intent Intent that contains information about which tab should be selected
*/
private void displayFragment(Intent intent) {
- // TODO krelease: Make navigation via intent work by displaying the correct fragment
- // as appropriate.
-
// If we got here by hitting send and we're in call forward along to the in-call activity
boolean recentCallsRequest = Calls.CONTENT_TYPE.equals(intent.resolveType(
getContentResolver()));
@@ -619,9 +580,7 @@
if (mDialpadFragment != null && (phoneIsInUse() || isDialIntent(intent))) {
mDialpadFragment.setStartedFromNewIntent(true);
- // TODO krelease: This should use showDialpadFragment(false) to avoid animating
- // the dialpad in. Need to fix the onPreDrawListener in NewDialpadFragment first.
- showDialpadFragment(true);
+ showDialpadFragment(false);
}
}
@@ -704,8 +663,8 @@
}
}
- private final NewPhoneFavoriteFragment.Listener mPhoneFavoriteListener =
- new NewPhoneFavoriteFragment.Listener() {
+ private final PhoneFavoriteFragment.Listener mPhoneFavoriteListener =
+ new PhoneFavoriteFragment.Listener() {
@Override
public void onContactSelected(Uri contactUri) {
PhoneNumberInteraction.startInteractionForPhoneCall(
@@ -801,8 +760,6 @@
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;
@@ -846,4 +803,10 @@
Context.TELEPHONY_SERVICE);
return tm.getCallState() != TelephonyManager.CALL_STATE_IDLE;
}
+
+ @Override
+ public void onShowAllContacts() {
+ final Intent intent = new Intent(this, AllContactsActivity.class);
+ startActivity(intent);
+ }
}
diff --git a/src/com/android/dialer/NewSearchFragment.java b/src/com/android/dialer/SearchFragment.java
similarity index 96%
rename from src/com/android/dialer/NewSearchFragment.java
rename to src/com/android/dialer/SearchFragment.java
index e8e40d6..54d29d4 100644
--- a/src/com/android/dialer/NewSearchFragment.java
+++ b/src/com/android/dialer/SearchFragment.java
@@ -25,11 +25,11 @@
import com.android.contacts.common.list.PhoneNumberPickerFragment;
import com.android.dialer.list.OnListFragmentScrolledListener;
-public class NewSearchFragment extends PhoneNumberPickerFragment {
+public class SearchFragment extends PhoneNumberPickerFragment {
private OnListFragmentScrolledListener mActivityScrollListener;
- public NewSearchFragment() {
+ public SearchFragment() {
setDirectorySearchEnabled(true);
}
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java
index 39909a1..662614f 100644
--- a/src/com/android/dialer/calllog/CallLogActivity.java
+++ b/src/com/android/dialer/calllog/CallLogActivity.java
@@ -151,7 +151,7 @@
@Override
public boolean onCreateOptionsMenu(Menu menu) {
final MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.call_log_options_new, menu);
+ inflater.inflate(R.menu.call_log_options, menu);
return true;
}
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 5d75004..a76d0c1 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -90,7 +90,6 @@
private final Handler mHandler = new Handler();
private TelephonyManager mTelephonyManager;
- private PhoneStateListener mPhoneStateListener;
private class CustomContentObserver extends ContentObserver {
public CustomContentObserver() {
@@ -322,7 +321,6 @@
mAdapter.changeCursor(null);
getActivity().getContentResolver().unregisterContentObserver(mCallLogObserver);
getActivity().getContentResolver().unregisterContentObserver(mContactsObserver);
- unregisterPhoneCallReceiver();
}
@Override
@@ -340,12 +338,6 @@
}
private void updateCallList(int filterType) {
- if (filterType == CallLogQueryHandler.CALL_TYPE_ALL) {
- unregisterPhoneCallReceiver();
- } else {
- // TODO krelease: Make this work
- //registerPhoneCallReceiver();
- }
mCallLogQueryHandler.fetchCalls(filterType);
}
@@ -487,48 +479,4 @@
serviceIntent.setAction(CallLogNotificationsService.ACTION_UPDATE_NOTIFICATIONS);
getActivity().startService(serviceIntent);
}
-
- // TODO krelease: Make the ViewPager switch to the correct tab (All) when a phone call is
- // placed.
- // This should probably be moved to the call log activity.
- /**
- * Register a phone call filter to reset the call type when a phone call is place.
- */
- /*
- private void registerPhoneCallReceiver() {
- if (mPhoneStateListener != null) {
- return; // Already registered.
- }
- mTelephonyManager = (TelephonyManager) getActivity().getSystemService(
- Context.TELEPHONY_SERVICE);
- mPhoneStateListener = new PhoneStateListener() {
- @Override
- public void onCallStateChanged(int state, String incomingNumber) {
- if (state != TelephonyManager.CALL_STATE_OFFHOOK &&
- state != TelephonyManager.CALL_STATE_RINGING) {
- return;
- }
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- if (getActivity() == null || getActivity().isFinishing()) {
- return;
- }
- }
- });
- }
- };
- mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
- }
- */
-
- /**
- * Un-registers the phone call receiver.
- */
- private void unregisterPhoneCallReceiver() {
- if (mPhoneStateListener != null) {
- mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
- mPhoneStateListener = null;
- }
- }
}
diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java
index fdebeb1..23366e4 100644
--- a/src/com/android/dialer/calllog/CallLogListItemHelper.java
+++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java
@@ -27,10 +27,6 @@
/**
* Helper class to fill in the views of a call log entry.
- * TODO krelease: The only difference between this and the original is that we don't touch
- * divider views, which are not present in the new dialer. Once the new dialer replaces
- * the old one, we can replace it entirely. Otherwise we would have redundant divider=null
- * checks all over the place.
*/
/* package */class CallLogListItemHelper {
/** Helper for populating the details of a phone call. */
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java
index 76cca33..fefbcc4 100644
--- a/src/com/android/dialer/dialpad/DialpadFragment.java
+++ b/src/com/android/dialer/dialpad/DialpadFragment.java
@@ -262,6 +262,7 @@
private boolean mStartedFromNewIntent = false;
private boolean mFirstLaunch = false;
+ private boolean mAdjustTranslationForAnimation = false;
private static final String PREF_DIGITS_FILLED_BY_INTENT = "pref_digits_filled_by_intent";
@@ -346,19 +347,21 @@
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
- final View fragmentView = inflater.inflate(R.layout.new_dialpad_fragment, container,
+ final View fragmentView = inflater.inflate(R.layout.dialpad_fragment, container,
false);
fragmentView.buildLayer();
- // TODO krelease: Get rid of this ugly hack which is to prevent the first frame of the
- // animation from drawing the fragment at translationY = 0
final ViewTreeObserver vto = fragmentView.getViewTreeObserver();
+ // Adjust the translation of the DialpadFragment in a preDrawListener instead of in
+ // DialtactsActivity, because at the point in time when the DialpadFragment is added,
+ // its views have not been laid out yet.
final OnPreDrawListener preDrawListener = new OnPreDrawListener() {
@Override
public boolean onPreDraw() {
+
if (isHidden()) return true;
- if (fragmentView.getTranslationY() == 0) {
+ if (mAdjustTranslationForAnimation && fragmentView.getTranslationY() == 0) {
((DialpadSlidingLinearLayout) fragmentView).setYFraction(
DIALPAD_SLIDE_FRACTION);
}
@@ -374,6 +377,7 @@
// Load up the resources for the text field.
Resources r = getResources();
+ mDialButtonContainer = fragmentView.findViewById(R.id.dialButtonContainer);
mDigitsContainer = fragmentView.findViewById(R.id.digits_container);
mDigits = (EditText) fragmentView.findViewById(R.id.digits);
mDigits.setKeyListener(UnicodeDialerKeyListener.INSTANCE);
@@ -938,7 +942,7 @@
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.inflate(R.menu.dialpad_options);
popupMenu.setOnMenuItemClickListener(this);
setupMenuItems(menu);
popupMenu.show();
@@ -1660,6 +1664,10 @@
// TODO: Filter out emergency numbers if
// the carrier does not want redial for
// these.
+ // If the fragment has already been detached since the last time
+ // we called queryLastOutgoingCall in onResume there is no point
+ // doing anything here.
+ if (getActivity() == null) return;
mLastNumberDialed = number;
updateDialAndDeleteButtonEnabledState();
}
@@ -1691,4 +1699,12 @@
activity.hideSearchBar();
}
}
+
+ public void setAdjustTranslationForAnimation(boolean value) {
+ mAdjustTranslationForAnimation = value;
+ }
+
+ public void setYFraction(float yFraction) {
+ ((DialpadSlidingLinearLayout) getView()).setYFraction(yFraction);
+ }
}
diff --git a/src/com/android/dialer/dialpad/SmartDialEntry.java b/src/com/android/dialer/dialpad/SmartDialEntry.java
deleted file mode 100644
index 9ff4912..0000000
--- a/src/com/android/dialer/dialpad/SmartDialEntry.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.net.Uri;
-
-import java.util.ArrayList;
-
-public class SmartDialEntry {
- /** Display name for the contact. */
- public final CharSequence displayName;
- public final Uri contactUri;
- public final CharSequence phoneNumber;
-
- public final ArrayList<SmartDialMatchPosition> matchPositions;
- public final SmartDialMatchPosition phoneNumberMatchPosition;
-
- public static final SmartDialEntry NULL = new SmartDialEntry("", Uri.EMPTY, "",
- new ArrayList<SmartDialMatchPosition>(), null);
-
- public SmartDialEntry(CharSequence displayName, Uri contactUri, CharSequence phoneNumber,
- ArrayList<SmartDialMatchPosition> matchPositions,
- SmartDialMatchPosition phoneNumberMatchPosition) {
- this.displayName = displayName;
- this.contactUri = contactUri;
- this.matchPositions = matchPositions;
- this.phoneNumber = phoneNumber;
- this.phoneNumberMatchPosition = phoneNumberMatchPosition;
- }
-}
diff --git a/src/com/android/dialer/dialpad/SmartDialLoaderTask.java b/src/com/android/dialer/dialpad/SmartDialLoaderTask.java
deleted file mode 100644
index 38a04ad..0000000
--- a/src/com/android/dialer/dialpad/SmartDialLoaderTask.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.os.AsyncTask;
-import android.provider.ContactsContract;
-import android.provider.ContactsContract.Contacts;
-import android.telephony.PhoneNumberUtils;
-
-import com.android.contacts.common.preference.ContactsPreferences;
-import com.android.contacts.common.util.StopWatch;
-import com.android.dialer.database.DialerDatabaseHelper;
-import com.android.dialer.database.DialerDatabaseHelper.ContactNumber;
-
-import com.google.common.collect.Lists;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This task searches through the provided cache to return the top 3 contacts(ranked by confidence)
- * that match the query, then passes it back to the {@link SmartDialLoaderCallback} through a
- * callback function.
- */
-public class SmartDialLoaderTask extends AsyncTask<String, Integer, List<SmartDialEntry>> {
- private final String TAG = SmartDialLoaderTask.class.getSimpleName();
-
- public interface SmartDialLoaderCallback {
- void setSmartDialAdapterEntries(List<SmartDialEntry> list, String query);
- }
-
- static private final boolean DEBUG = false;
-
- private final SmartDialLoaderCallback mCallback;
-
- private final DialerDatabaseHelper mDialerDatabaseHelper;
-
- private final String mQuery;
-
- private final SmartDialNameMatcher mNameMatcher;
-
- public SmartDialLoaderTask(SmartDialLoaderCallback callback, String query, Context context) {
- this.mCallback = callback;
- mDialerDatabaseHelper = DialerDatabaseHelper.getInstance(context);
- this.mQuery = query;
- this.mNameMatcher = new SmartDialNameMatcher(PhoneNumberUtils.normalizeNumber(query),
- SmartDialPrefix.getMap());
- }
-
- @Override
- protected List<SmartDialEntry> doInBackground(String... params) {
- return getContactMatches();
- }
-
- @Override
- protected void onPostExecute(List<SmartDialEntry> result) {
- if (mCallback != null) {
- mCallback.setSmartDialAdapterEntries(result, mQuery);
- }
- }
-
- /**
- * Loads top visible contacts with phone numbers and check if their display names match the
- * query.
- */
- private ArrayList<SmartDialEntry> getContactMatches() {
-
- final StopWatch stopWatch = DEBUG ? StopWatch.start("Start Match") : null;
-
- final ArrayList<ContactNumber> allMatches = mDialerDatabaseHelper.getLooseMatches(mQuery,
- mNameMatcher);
- if (DEBUG) {
- stopWatch.lap("Find matches");
- }
-
- final ArrayList<SmartDialEntry> candidates = Lists.newArrayList();
- for (ContactNumber contact : allMatches) {
- final boolean matches = mNameMatcher.matches(contact.displayName);
- candidates.add(new SmartDialEntry(
- contact.displayName,
- Contacts.getLookupUri(contact.id, contact.lookupKey),
- contact.phoneNumber,
- mNameMatcher.getMatchPositions(),
- mNameMatcher.matchesNumber(contact.phoneNumber, mNameMatcher.getQuery())
- ));
- }
- if (DEBUG) {
- stopWatch.stopAndLog(TAG + " Match Complete", 0);
- }
- return candidates;
- }
-}
diff --git a/src/com/android/dialer/dialpad/SmartDialTextView.java b/src/com/android/dialer/dialpad/SmartDialTextView.java
deleted file mode 100644
index 398f99b..0000000
--- a/src/com/android/dialer/dialpad/SmartDialTextView.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.Paint;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.widget.TextView;
-
-import com.android.dialer.R;
-
-public class SmartDialTextView extends TextView {
-
- private final float mPadding;
- private final float mExtraPadding;
-
- public SmartDialTextView(Context context) {
- this(context, null);
- }
-
- public SmartDialTextView(Context context, AttributeSet attrs) {
- super(context, attrs);
- mPadding = getResources().getDimension(R.dimen.smartdial_suggestions_padding);
- mExtraPadding = getResources().getDimension(R.dimen.smartdial_suggestions_extra_padding);
- }
-
- @Override
- protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
- super.onTextChanged(text, start, lengthBefore, lengthAfter);
- rescaleText(getWidth());
- }
-
- @Override
- protected void onSizeChanged(int w, int h, int oldw, int oldh) {
- super.onSizeChanged(w, h, oldw, oldh);
- rescaleText(w);
- }
-
- private void rescaleText(int w) {
- if (w == 0) {
- return;
- }
- setTextScaleX(1);
- final Paint paint = getPaint();
- float width = w - 2 * mPadding - 2 * mExtraPadding;
-
- float ratio = width / paint.measureText(getText().toString());
- TextUtils.TruncateAt ellipsizeAt = null;
- if (ratio < 1.0f) {
- if (ratio < 0.8f) {
- // If the text is too big to fit even after scaling to 80%, just ellipsize it
- // instead.
- ellipsizeAt = TextUtils.TruncateAt.END;
- setTextScaleX(0.8f);
- } else {
- setTextScaleX(ratio);
- }
- }
- setEllipsize(ellipsizeAt);
- }
-}
diff --git a/src/com/android/dialer/list/AllContactsActivity.java b/src/com/android/dialer/list/AllContactsActivity.java
new file mode 100644
index 0000000..c46702f
--- /dev/null
+++ b/src/com/android/dialer/list/AllContactsActivity.java
@@ -0,0 +1,100 @@
+/*
+ * 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.Fragment;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.TypefaceSpan;
+import android.util.Log;
+
+import com.android.contacts.common.CallUtil;
+import com.android.contacts.common.activity.TransactionSafeActivity;
+import com.android.contacts.common.list.OnPhoneNumberPickerActionListener;
+import com.android.dialer.DialtactsActivity;
+import com.android.dialer.R;
+import com.android.dialer.interactions.PhoneNumberInteraction;
+
+public class AllContactsActivity extends TransactionSafeActivity {
+ private static final String TAG = AllContactsActivity.class.getSimpleName();
+
+ private AllContactsFragment mAllContactsFragment;
+
+ // Same behavior as {@link DialtactsActivity}
+ private final OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener =
+ new OnPhoneNumberPickerActionListener() {
+ @Override
+ public void onPickPhoneNumberAction(Uri dataUri) {
+ // Specify call-origin so that users will see the previous tab instead of
+ // CallLog screen (search UI will be automatically exited).
+ PhoneNumberInteraction.startInteractionForPhoneCall(
+ AllContactsActivity.this, dataUri, null);
+ }
+
+ @Override
+ public void onCallNumberDirectly(String phoneNumber) {
+ final Intent intent = CallUtil.getCallIntent(phoneNumber, null);
+ startActivity(intent);
+ }
+
+ @Override
+ public void onShortcutIntentCreated(Intent intent) {
+ Log.w(TAG, "Unsupported intent has come (" + intent + "). Ignoring.");
+ }
+
+ @Override
+ public void onHomeInActionBarSelected() {
+ // {@link PhoneNumberPickerFragment handles onClick on the home button
+ // and performs the callback here. This means we don't have to handle it
+ // ourself in the activity.
+ final Intent intent = new Intent(AllContactsActivity.this,
+ DialtactsActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(intent);
+ }
+ };
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ final ActionBar actionBar = 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_font_family)), 0,
+ s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ actionBar.setTitle(s);
+
+ setContentView(R.layout.all_contacts_activity);
+ }
+
+ @Override
+ public void onAttachFragment(Fragment fragment) {
+ if (fragment instanceof AllContactsFragment) {
+ mAllContactsFragment = (AllContactsFragment) fragment;
+ mAllContactsFragment.setOnPhoneNumberPickerActionListener(
+ mPhoneNumberPickerActionListener);
+ }
+ }
+}
diff --git a/src/com/android/dialer/list/AllContactsFragment.java b/src/com/android/dialer/list/AllContactsFragment.java
new file mode 100644
index 0000000..40d5c14
--- /dev/null
+++ b/src/com/android/dialer/list/AllContactsFragment.java
@@ -0,0 +1,55 @@
+/*
+
+ * 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.Activity;
+import android.os.Bundle;
+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;
+
+/**
+ * Fragments to show all contacts with phone numbers.
+ */
+public class AllContactsFragment 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
+ protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+ return inflater.inflate(R.layout.show_all_contacts_fragment, null);
+ }
+}
diff --git a/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java b/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java
deleted file mode 100644
index 3c32004..0000000
--- a/src/com/android/dialer/list/NewPhoneFavoriteMergedAdapter.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc.
- * Licensed to 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.res.Resources;
-import android.database.DataSetObserver;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.FrameLayout;
-
-import com.android.dialer.R;
-import com.android.dialer.calllog.CallLogAdapter;
-
-/**
- * An adapter that combines items from {@link com.android.contacts.common.list.ContactTileAdapter}
- * and {@link com.android.dialer.calllog.CallLogAdapter} into a single list.
- */
-public class NewPhoneFavoriteMergedAdapter extends BaseAdapter {
-
- private class CustomDataSetObserver extends DataSetObserver {
- @Override
- public void onChanged() {
- notifyDataSetChanged();
- }
- }
-
- private static final String TAG = NewPhoneFavoriteMergedAdapter.class.getSimpleName();
-
- private final PhoneFavoritesTileAdapter mContactTileAdapter;
- private final CallLogAdapter mCallLogAdapter;
- private final View mLoadingView;
- private final View mShowAllContactsButton;
-
- private final int mCallLogPadding;
-
- private final Context mContext;
-
- private final DataSetObserver mObserver;
-
- public NewPhoneFavoriteMergedAdapter(Context context,
- PhoneFavoritesTileAdapter contactTileAdapter,
- View accountFilterHeaderContainer,
- CallLogAdapter callLogAdapter,
- View loadingView,
- View showAllContactsButton) {
- final Resources resources = context.getResources();
- mContext = context;
- mCallLogPadding = resources.getDimensionPixelSize(R.dimen.recent_call_log_item_padding);
- mContactTileAdapter = contactTileAdapter;
- mCallLogAdapter = callLogAdapter;
-
- mObserver = new CustomDataSetObserver();
- mContactTileAdapter.registerDataSetObserver(mObserver);
- mLoadingView = loadingView;
- mShowAllContactsButton = showAllContactsButton;
- }
-
- @Override
- public boolean isEmpty() {
- // This adapter will always contain at least the all contacts button
- return false;
- }
-
- @Override
- public int getCount() {
- return mContactTileAdapter.getCount() + mCallLogAdapter.getCount() + 1;
- }
-
- @Override
- public Object getItem(int position) {
- final int callLogAdapterCount = mCallLogAdapter.getCount();
-
- if (callLogAdapterCount > 0) {
- if (position < callLogAdapterCount) {
- return mCallLogAdapter.getItem(position);
- }
- // Set position to the position of the actual favorite contact in the favorites adapter
- position = getAdjustedFavoritePosition(position, callLogAdapterCount);
- }
- return mContactTileAdapter.getItem(position);
- }
-
- @Override
- public long getItemId(int position) {
- return position;
- }
-
- @Override
- public int getViewTypeCount() {
- return (mContactTileAdapter.getViewTypeCount() + mCallLogAdapter.getViewTypeCount() + 1);
- }
-
- @Override
- public int getItemViewType(int position) {
- final int callLogAdapterCount = mCallLogAdapter.getCount();
-
- if (position < callLogAdapterCount) {
- // View type of the call log adapter is the last view type of the contact tile adapter
- // + 1
- return mContactTileAdapter.getViewTypeCount();
- } 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 callLogAdapterCount = mCallLogAdapter.getCount();
-
- if (position == getCount() - 1) {
- return mShowAllContactsButton;
- }
-
- if (callLogAdapterCount > 0) {
- if (position == 0) {
- final FrameLayout wrapper;
- if (convertView == null) {
- wrapper = new FrameLayout(mContext);
- } else {
- wrapper = (FrameLayout) convertView;
- }
-
- // Special case wrapper view for the most recent call log item. This allows
- // us to create a card-like effect for the more recent call log item in
- // the PhoneFavoriteMergedAdapter, but keep the original look of the item in
- // the CallLogAdapter.
- final View view = mCallLogAdapter.getView(position, convertView == null ?
- null : wrapper.getChildAt(0), parent);
- wrapper.removeAllViews();
- view.setBackgroundResource(R.drawable.dialer_recent_card_bg);
-
- final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
- FrameLayout.LayoutParams.WRAP_CONTENT,
- FrameLayout.LayoutParams.WRAP_CONTENT);
-
- params.setMarginsRelative(mCallLogPadding, mCallLogPadding, mCallLogPadding,
- mCallLogPadding);
- view.setLayoutParams(params);
- wrapper.addView(view);
-
- return wrapper;
- }
- // Set position to the position of the actual favorite contact in the
- // favorites adapter
- position = getAdjustedFavoritePosition(position, callLogAdapterCount);
- }
-
- // Favorites section
- final View view = mContactTileAdapter.getView(position, convertView, parent);
- if (position >= mContactTileAdapter.getMaxTiledRows()) {
- final FrameLayout frameLayout = (FrameLayout) view;
- final View child = frameLayout.getChildAt(0);
- FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
- FrameLayout.LayoutParams.WRAP_CONTENT,
- FrameLayout.LayoutParams.WRAP_CONTENT);
- child.setLayoutParams(params);
- }
- return view;
- }
-
- @Override
- public boolean areAllItemsEnabled() {
- // If "all" section is being loaded we'll show mLoadingView, which is not enabled.
- // Otherwise check the all the other components in the ListView and return appropriate
- // result.
- return mCallLogAdapter.areAllItemsEnabled() && mContactTileAdapter.areAllItemsEnabled();
- }
-
- @Override
- public boolean isEnabled(int position) {
- final int callLogAdapterCount = mCallLogAdapter.getCount();
- if (position < callLogAdapterCount) {
- return mCallLogAdapter.isEnabled(position);
- } else { // For favorites section
- return mContactTileAdapter.isEnabled(
- getAdjustedFavoritePosition(position, callLogAdapterCount));
- }
- }
-
- private int getAdjustedFavoritePosition(int position, int callLogAdapterCount) {
- return position - callLogAdapterCount;
- }
-}
diff --git a/src/com/android/dialer/list/NewPhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java
similarity index 88%
rename from src/com/android/dialer/list/NewPhoneFavoriteFragment.java
rename to src/com/android/dialer/list/PhoneFavoriteFragment.java
index 58dac2f..b6a5fb4 100644
--- a/src/com/android/dialer/list/NewPhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java
@@ -19,6 +19,7 @@
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;
@@ -56,21 +57,24 @@
* {@link com.android.contacts.common.list.PhoneNumberListAdapter} into one unified list using {@link PhoneFavoriteMergedAdapter}.
* A contact filter header is also inserted between those adapters' results.
*/
-public class NewPhoneFavoriteFragment extends Fragment implements OnItemClickListener,
+public class PhoneFavoriteFragment extends Fragment implements OnItemClickListener,
CallLogQueryHandler.Listener, CallLogAdapter.CallFetcher {
- private static final String TAG = NewPhoneFavoriteFragment.class.getSimpleName();
+ private static final String TAG = PhoneFavoriteFragment.class.getSimpleName();
private static final boolean DEBUG = false;
/**
* Used with LoaderManager.
*/
private static int LOADER_ID_CONTACT_TILE = 1;
- private static int LOADER_ID_ALL_CONTACTS = 2;
public interface OnPhoneFavoriteFragmentStartedListener {
public void onPhoneFavoriteFragmentStarted();
}
+ public interface OnShowAllContactsListener {
+ public void onShowAllContacts();
+ }
+
public interface Listener {
public void onContactSelected(Uri contactUri);
public void onCallNumberDirectly(String phoneNumber);
@@ -134,9 +138,9 @@
private Listener mListener;
private OnListFragmentScrolledListener mActivityScrollListener;
- private NewPhoneFavoriteMergedAdapter mAdapter;
+ private OnShowAllContactsListener mShowAllContactsListener;
+ private PhoneFavoriteMergedAdapter mAdapter;
private PhoneFavoritesTileAdapter mContactTileAdapter;
- private PhoneNumberListAdapter mAllContactsAdapter;
private CallLogAdapter mCallLogAdapter;
private CallLogQueryHandler mCallLogQueryHandler;
@@ -162,8 +166,6 @@
new ContactTileLoaderListener();
private final ScrollListener mScrollListener = new ScrollListener();
- private boolean mOptionsMenuHasFrequents;
-
@Override
public void onAttach(Activity activity) {
if (DEBUG) Log.d(TAG, "onAttach()");
@@ -203,7 +205,7 @@
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View listLayout = inflater.inflate(
- R.layout.new_phone_favorites_fragment, container, false);
+ R.layout.phone_favorites_fragment, container, false);
mListView = (ListView) listLayout.findViewById(R.id.contact_tile_list);
mListView.setItemsCanFocus(true);
@@ -229,7 +231,7 @@
}
});
- mAdapter = new NewPhoneFavoriteMergedAdapter(getActivity(), mContactTileAdapter,
+ mAdapter = new PhoneFavoriteMergedAdapter(getActivity(), mContactTileAdapter,
mAccountFilterHeaderContainer, mCallLogAdapter, mLoadingView,
mShowAllContactsButton);
@@ -246,24 +248,8 @@
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() {
- return mOptionsMenuHasFrequents != hasFrequents();
- }
-
- // TODO krelease: Configure the menu items properly. Since the menu items show up as a PopupMenu
- // rather than a normal actionbar menu, the initialization should be done there.
- /*
- @Override
- public void onPrepareOptionsMenu(Menu menu) {
- final MenuItem clearFrequents = menu.findItem(R.id.menu_clear_frequents);
- mOptionsMenuHasFrequents = hasFrequents();
- clearFrequents.setVisible(mOptionsMenuHasFrequents);
- }*/
-
- private boolean hasFrequents() {
+ public boolean hasFrequents() {
+ if (mContactTileAdapter == null) return false;
return mContactTileAdapter.getNumFrequents() > 0;
}
@@ -287,6 +273,13 @@
+ " must implement OnListFragmentScrolledListener");
}
+ try {
+ mShowAllContactsListener = (OnShowAllContactsListener) activity;
+ } catch (ClassCastException e) {
+ throw new ClassCastException(activity.toString()
+ + " must implement OnShowAllContactsListener");
+ }
+
// 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.
@@ -312,10 +305,7 @@
* Gets called when user click on the show all contacts button.
*/
private void showAllContacts() {
- // TODO {klp} Use interface for the fragment to communicate with the activity
- if (getActivity() instanceof DialtactsActivity) {
- ((DialtactsActivity) getActivity()).showAllContactsFragment();
- }
+ mShowAllContactsListener.onShowAllContacts();
}
public void setListener(Listener listener) {
diff --git a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java b/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
index ba291a0..0e5594e 100644
--- a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
+++ b/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
@@ -23,19 +23,15 @@
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
-import android.widget.SectionIndexer;
-import com.android.contacts.common.list.ContactEntryListAdapter;
-import com.android.contacts.common.list.ContactListItemView;
-import com.android.contacts.common.list.ContactTileAdapter;
import com.android.dialer.R;
+import com.android.dialer.calllog.CallLogAdapter;
/**
- * An adapter that combines items from {@link com.android.contacts.common.list.ContactTileAdapter} and
- * {@link com.android.contacts.common.list.ContactEntryListAdapter} into a single list. In between those two results,
- * an account filter header will be inserted.
+ * An adapter that combines items from {@link com.android.contacts.common.list.ContactTileAdapter}
+ * and {@link com.android.dialer.calllog.CallLogAdapter} into a single list.
*/
-public class PhoneFavoriteMergedAdapter extends BaseAdapter implements SectionIndexer {
+public class PhoneFavoriteMergedAdapter extends BaseAdapter {
private class CustomDataSetObserver extends DataSetObserver {
@Override
@@ -44,80 +40,60 @@
}
}
- private final ContactTileAdapter mContactTileAdapter;
- private final ContactEntryListAdapter mContactEntryListAdapter;
- private final View mAccountFilterHeaderContainer;
+ private static final String TAG = PhoneFavoriteMergedAdapter.class.getSimpleName();
+
+ private final PhoneFavoritesTileAdapter mContactTileAdapter;
+ private final CallLogAdapter mCallLogAdapter;
private final View mLoadingView;
+ private final View mShowAllContactsButton;
- private final int mItemPaddingLeft;
- private final int mItemPaddingRight;
+ private final int mCallLogPadding;
- // Make frequent header consistent with account filter header.
- private final int mFrequentHeaderPaddingTop;
+ private final Context mContext;
private final DataSetObserver mObserver;
public PhoneFavoriteMergedAdapter(Context context,
- ContactTileAdapter contactTileAdapter,
+ PhoneFavoritesTileAdapter contactTileAdapter,
View accountFilterHeaderContainer,
- ContactEntryListAdapter contactEntryListAdapter,
- View loadingView) {
- Resources resources = context.getResources();
- mItemPaddingLeft = resources.getDimensionPixelSize(R.dimen.detail_item_side_margin);
- mItemPaddingRight = resources.getDimensionPixelSize(R.dimen.list_visible_scrollbar_padding);
- mFrequentHeaderPaddingTop = resources.getDimensionPixelSize(
- R.dimen.contact_browser_list_top_margin);
+ CallLogAdapter callLogAdapter,
+ View loadingView,
+ View showAllContactsButton) {
+ final Resources resources = context.getResources();
+ mContext = context;
+ mCallLogPadding = resources.getDimensionPixelSize(R.dimen.recent_call_log_item_padding);
mContactTileAdapter = contactTileAdapter;
- mContactEntryListAdapter = contactEntryListAdapter;
-
- mAccountFilterHeaderContainer = accountFilterHeaderContainer;
+ mCallLogAdapter = callLogAdapter;
mObserver = new CustomDataSetObserver();
mContactTileAdapter.registerDataSetObserver(mObserver);
- mContactEntryListAdapter.registerDataSetObserver(mObserver);
-
mLoadingView = loadingView;
+ mShowAllContactsButton = showAllContactsButton;
}
@Override
public boolean isEmpty() {
- // Cannot use the super's method here because we add extra rows in getCount() to account
- // for headers
- return mContactTileAdapter.getCount() + mContactEntryListAdapter.getCount() == 0;
+ // This adapter will always contain at least the all contacts button
+ return false;
}
@Override
public int getCount() {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- final int contactEntryListAdapterCount = mContactEntryListAdapter.getCount();
- if (mContactEntryListAdapter.isLoading()) {
- // Hide "all" contacts during its being loaded. Instead show "loading" view.
- //
- // "+2" for mAccountFilterHeaderContainer and mLoadingView
- return contactTileAdapterCount + 2;
- } else {
- // "+1" for mAccountFilterHeaderContainer
- return contactTileAdapterCount + contactEntryListAdapterCount + 1;
- }
+ return mContactTileAdapter.getCount() + mCallLogAdapter.getCount() + 1;
}
@Override
public Object getItem(int position) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- final int contactEntryListAdapterCount = mContactEntryListAdapter.getCount();
- if (position < contactTileAdapterCount) { // For "tile" and "frequent" sections
- return mContactTileAdapter.getItem(position);
- } else if (position == contactTileAdapterCount) { // For "all" section's account header
- return mAccountFilterHeaderContainer;
- } else { // For "all" section
- if (mContactEntryListAdapter.isLoading()) { // "All" section is being loaded.
- return mLoadingView;
- } else {
- // "-1" for mAccountFilterHeaderContainer
- final int localPosition = position - contactTileAdapterCount - 1;
- return mContactTileAdapter.getItem(localPosition);
+ final int callLogAdapterCount = mCallLogAdapter.getCount();
+
+ if (callLogAdapterCount > 0) {
+ if (position < callLogAdapterCount) {
+ return mCallLogAdapter.getItem(position);
}
+ // Set position to the position of the actual favorite contact in the favorites adapter
+ position = getAdjustedFavoritePosition(position, callLogAdapterCount);
}
+ return mContactTileAdapter.getItem(position);
}
@Override
@@ -127,122 +103,80 @@
@Override
public int getViewTypeCount() {
- // "+2" for mAccountFilterHeaderContainer and mLoadingView
- return (mContactTileAdapter.getViewTypeCount()
- + mContactEntryListAdapter.getViewTypeCount()
- + 2);
+ return (mContactTileAdapter.getViewTypeCount() + mCallLogAdapter.getViewTypeCount() + 1);
}
@Override
public int getItemViewType(int position) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- final int contactEntryListAdapterCount = mContactEntryListAdapter.getCount();
- // There should be four kinds of types that are usually used, and one more exceptional
- // type (IGNORE_ITEM_VIEW_TYPE), which sometimes comes from mContactTileAdapter.
- //
- // The four ordinary view types have the index equal to or more than 0, and less than
- // mContactTileAdapter.getViewTypeCount()+ mContactEntryListAdapter.getViewTypeCount() + 2.
- // (See also this class's getViewTypeCount())
- //
- // We have those values for:
- // - The view types mContactTileAdapter originally has
- // - The view types mContactEntryListAdapter originally has
- // - mAccountFilterHeaderContainer ("all" section's account header), and
- // - mLoadingView
- //
- // Those types should not be mixed, so we have a different range for each kinds of types:
- // - Types for mContactTileAdapter ("tile" and "frequent" sections)
- // They should have the index, >=0 and <mContactTileAdapter.getViewTypeCount()
- //
- // - Types for mContactEntryListAdapter ("all" sections)
- // They should have the index, >=mContactTileAdapter.getViewTypeCount() and
- // <(mContactTileAdapter.getViewTypeCount() + mContactEntryListAdapter.getViewTypeCount())
- //
- // - Type for "all" section's account header
- // It should have the exact index
- // mContactTileAdapter.getViewTypeCount()+ mContactEntryListAdapter.getViewTypeCount()
- //
- // - Type for "loading" view used during "all" section is being loaded.
- // It should have the exact index
- // mContactTileAdapter.getViewTypeCount()+ mContactEntryListAdapter.getViewTypeCount() + 1
- //
- // As an exception, IGNORE_ITEM_VIEW_TYPE (-1) will be remained as is, which will be used
- // by framework's Adapter implementation and thus should be left as is.
- if (position < contactTileAdapterCount) { // For "tile" and "frequent" sections
- return mContactTileAdapter.getItemViewType(position);
- } else if (position == contactTileAdapterCount) { // For "all" section's account header
- return mContactTileAdapter.getViewTypeCount()
- + mContactEntryListAdapter.getViewTypeCount();
- } else { // For "all" section
- if (mContactEntryListAdapter.isLoading()) { // "All" section is being loaded.
- return mContactTileAdapter.getViewTypeCount()
- + mContactEntryListAdapter.getViewTypeCount() + 1;
- } else {
- // "-1" for mAccountFilterHeaderContainer
- final int localPosition = position - contactTileAdapterCount - 1;
- final int type = mContactEntryListAdapter.getItemViewType(localPosition);
- // IGNORE_ITEM_VIEW_TYPE must be handled differently.
- return (type < 0) ? type : type + mContactTileAdapter.getViewTypeCount();
- }
+ final int callLogAdapterCount = mCallLogAdapter.getCount();
+
+ if (position < callLogAdapterCount) {
+ // View type of the call log adapter is the last view type of the contact tile adapter
+ // + 1
+ return mContactTileAdapter.getViewTypeCount();
+ } 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 contactEntryListAdapterCount = mContactEntryListAdapter.getCount();
+ final int callLogAdapterCount = mCallLogAdapter.getCount();
- // Obtain a View relevant for that position, and adjust its horizontal padding. Each
- // View has different implementation, so we use different way to control those padding.
- if (position < contactTileAdapterCount) { // For "tile" and "frequent" sections
- final View view = mContactTileAdapter.getView(position, convertView, parent);
- final int frequentHeaderPosition = mContactTileAdapter.getFrequentHeaderPosition();
- if (position < frequentHeaderPosition) { // "starred" contacts
- // No padding adjustment.
- } else if (position == frequentHeaderPosition) {
- view.setPadding(mItemPaddingLeft, mFrequentHeaderPaddingTop,
- mItemPaddingRight, view.getPaddingBottom());
- } else {
- // Views for "frequent" contacts use FrameLayout's margins instead of padding.
- final FrameLayout frameLayout = (FrameLayout) view;
- final View child = frameLayout.getChildAt(0);
- FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
+ if (position == getCount() - 1) {
+ return mShowAllContactsButton;
+ }
+
+ if (callLogAdapterCount > 0) {
+ if (position == 0) {
+ final FrameLayout wrapper;
+ if (convertView == null) {
+ wrapper = new FrameLayout(mContext);
+ } else {
+ wrapper = (FrameLayout) convertView;
+ }
+
+ // Special case wrapper view for the most recent call log item. This allows
+ // us to create a card-like effect for the more recent call log item in
+ // the PhoneFavoriteMergedAdapter, but keep the original look of the item in
+ // the CallLogAdapter.
+ final View view = mCallLogAdapter.getView(position, convertView == null ?
+ null : wrapper.getChildAt(0), parent);
+ wrapper.removeAllViews();
+ view.setBackgroundResource(R.drawable.dialer_recent_card_bg);
+
+ final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
FrameLayout.LayoutParams.WRAP_CONTENT);
- params.setMargins(mItemPaddingLeft, 0, mItemPaddingRight, 0);
- child.setLayoutParams(params);
- }
- return view;
- } else if (position == contactTileAdapterCount) { // For "all" section's account header
- mAccountFilterHeaderContainer.setPadding(mItemPaddingLeft,
- mAccountFilterHeaderContainer.getPaddingTop(),
- mItemPaddingRight,
- mAccountFilterHeaderContainer.getPaddingBottom());
- // Show a single "No Contacts" label under the "all" section account header
- // if no contacts are displayed.
- mAccountFilterHeaderContainer.findViewById(
- R.id.contact_list_all_empty).setVisibility(
- contactEntryListAdapterCount == 0 ? View.VISIBLE : View.GONE);
- return mAccountFilterHeaderContainer;
- } else { // For "all" section
- if (mContactEntryListAdapter.isLoading()) { // "All" section is being loaded.
- mLoadingView.setPadding(mItemPaddingLeft,
- mLoadingView.getPaddingTop(),
- mItemPaddingRight,
- mLoadingView.getPaddingBottom());
- return mLoadingView;
- } else {
- // "-1" for mAccountFilterHeaderContainer
- final int localPosition = position - contactTileAdapterCount - 1;
- final ContactListItemView itemView = (ContactListItemView)
- mContactEntryListAdapter.getView(localPosition, convertView, null);
- itemView.setPadding(mItemPaddingLeft, itemView.getPaddingTop(),
- mItemPaddingRight, itemView.getPaddingBottom());
- itemView.setSelectionBoundsHorizontalMargin(mItemPaddingLeft, mItemPaddingRight);
- return itemView;
+ params.setMarginsRelative(mCallLogPadding, mCallLogPadding, mCallLogPadding,
+ mCallLogPadding);
+ view.setLayoutParams(params);
+ wrapper.addView(view);
+
+ return wrapper;
}
+ // Set position to the position of the actual favorite contact in the
+ // favorites adapter
+ position = getAdjustedFavoritePosition(position, callLogAdapterCount);
}
+
+ // Favorites section
+ final View view = mContactTileAdapter.getView(position, convertView, parent);
+ if (position >= mContactTileAdapter.getMaxTiledRows()) {
+ final FrameLayout frameLayout = (FrameLayout) view;
+ final View child = frameLayout.getChildAt(0);
+ FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
+ FrameLayout.LayoutParams.WRAP_CONTENT,
+ FrameLayout.LayoutParams.WRAP_CONTENT);
+ child.setLayoutParams(params);
+ }
+ return view;
}
@Override
@@ -250,58 +184,21 @@
// If "all" section is being loaded we'll show mLoadingView, which is not enabled.
// Otherwise check the all the other components in the ListView and return appropriate
// result.
- return !mContactEntryListAdapter.isLoading()
- && (mContactTileAdapter.areAllItemsEnabled()
- && mAccountFilterHeaderContainer.isEnabled()
- && mContactEntryListAdapter.areAllItemsEnabled());
+ return mCallLogAdapter.areAllItemsEnabled() && mContactTileAdapter.areAllItemsEnabled();
}
@Override
public boolean isEnabled(int position) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- final int contactEntryListAdapterCount = mContactEntryListAdapter.getCount();
- if (position < contactTileAdapterCount) { // For "tile" and "frequent" sections
- return mContactTileAdapter.isEnabled(position);
- } else if (position == contactTileAdapterCount) { // For "all" section's account header
- // This will be handled by View's onClick event instead of ListView's onItemClick event.
- return false;
- } else { // For "all" section
- if (mContactEntryListAdapter.isLoading()) { // "All" section is being loaded.
- return false;
- } else {
- // "-1" for mAccountFilterHeaderContainer
- final int localPosition = position - contactTileAdapterCount - 1;
- return mContactEntryListAdapter.isEnabled(localPosition);
- }
+ final int callLogAdapterCount = mCallLogAdapter.getCount();
+ if (position < callLogAdapterCount) {
+ return mCallLogAdapter.isEnabled(position);
+ } else { // For favorites section
+ return mContactTileAdapter.isEnabled(
+ getAdjustedFavoritePosition(position, callLogAdapterCount));
}
}
- @Override
- public int getPositionForSection(int sectionIndex) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- final int localPosition = mContactEntryListAdapter.getPositionForSection(sectionIndex);
- return contactTileAdapterCount + 1 + localPosition;
- }
-
- @Override
- public int getSectionForPosition(int position) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- if (position <= contactTileAdapterCount) {
- return 0;
- } else {
- // "-1" for mAccountFilterHeaderContainer
- final int localPosition = position - contactTileAdapterCount - 1;
- return mContactEntryListAdapter.getSectionForPosition(localPosition);
- }
- }
-
- @Override
- public Object[] getSections() {
- return mContactEntryListAdapter.getSections();
- }
-
- public boolean shouldShowFirstScroller(int firstVisibleItem) {
- final int contactTileAdapterCount = mContactTileAdapter.getCount();
- return firstVisibleItem > contactTileAdapterCount;
+ private int getAdjustedFavoritePosition(int position, int callLogAdapterCount) {
+ return position - callLogAdapterCount;
}
}
diff --git a/src/com/android/dialer/list/ShowAllContactsFragment.java b/src/com/android/dialer/list/ShowAllContactsFragment.java
deleted file mode 100644
index 85806b6..0000000
--- a/src/com/android/dialer/list/ShowAllContactsFragment.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-
- * 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);
- }
-}