Merge "Fix for "editor gets grayed out" issue"
diff --git a/res/drawable-hdpi/btn_call_pressed.png b/res/drawable-hdpi/btn_call_pressed.png
new file mode 100644
index 0000000..f4b7bef
--- /dev/null
+++ b/res/drawable-hdpi/btn_call_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_pressed.9.png b/res/drawable-hdpi/btn_dial_pressed.9.png
deleted file mode 100644
index 10e2eec..0000000
--- a/res/drawable-hdpi/btn_dial_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_pressed.png b/res/drawable-hdpi/btn_dial_pressed.png
new file mode 100644
index 0000000..5ae0b16
--- /dev/null
+++ b/res/drawable-hdpi/btn_dial_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/call_log_action_bar_bg.9.png b/res/drawable-hdpi/call_log_action_bar_bg.9.png
new file mode 100644
index 0000000..2e4d0ca
--- /dev/null
+++ b/res/drawable-hdpi/call_log_action_bar_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_background_texture.png b/res/drawable-hdpi/dial_background_texture.png
new file mode 100644
index 0000000..177fad8
--- /dev/null
+++ b/res/drawable-hdpi/dial_background_texture.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_0_wht.png b/res/drawable-hdpi/dial_num_0_wht.png
index 2b194c8..172457b 100644
--- a/res/drawable-hdpi/dial_num_0_wht.png
+++ b/res/drawable-hdpi/dial_num_0_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_1_wht.png b/res/drawable-hdpi/dial_num_1_wht.png
new file mode 100644
index 0000000..b05227b
--- /dev/null
+++ b/res/drawable-hdpi/dial_num_1_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_2_wht.png b/res/drawable-hdpi/dial_num_2_wht.png
index 944d5d8..59b798f 100644
--- a/res/drawable-hdpi/dial_num_2_wht.png
+++ b/res/drawable-hdpi/dial_num_2_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_3_wht.png b/res/drawable-hdpi/dial_num_3_wht.png
index 9ed2bb5..4291341 100644
--- a/res/drawable-hdpi/dial_num_3_wht.png
+++ b/res/drawable-hdpi/dial_num_3_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_4_wht.png b/res/drawable-hdpi/dial_num_4_wht.png
index 92b1ca6..9901ba0 100644
--- a/res/drawable-hdpi/dial_num_4_wht.png
+++ b/res/drawable-hdpi/dial_num_4_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_5_wht.png b/res/drawable-hdpi/dial_num_5_wht.png
index 21f1ce6..905b2db 100644
--- a/res/drawable-hdpi/dial_num_5_wht.png
+++ b/res/drawable-hdpi/dial_num_5_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_6_wht.png b/res/drawable-hdpi/dial_num_6_wht.png
index b794ffb..08e3a6c 100644
--- a/res/drawable-hdpi/dial_num_6_wht.png
+++ b/res/drawable-hdpi/dial_num_6_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_7_wht.png b/res/drawable-hdpi/dial_num_7_wht.png
index c3cc401..3ba7aa6 100644
--- a/res/drawable-hdpi/dial_num_7_wht.png
+++ b/res/drawable-hdpi/dial_num_7_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_8_wht.png b/res/drawable-hdpi/dial_num_8_wht.png
index c199f96..5e670ed 100644
--- a/res/drawable-hdpi/dial_num_8_wht.png
+++ b/res/drawable-hdpi/dial_num_8_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_9_wht.png b/res/drawable-hdpi/dial_num_9_wht.png
index 07251e5..5a8fc9a 100644
--- a/res/drawable-hdpi/dial_num_9_wht.png
+++ b/res/drawable-hdpi/dial_num_9_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_pound_wht.png b/res/drawable-hdpi/dial_num_pound_wht.png
index 0e178dc..2ddc21d 100644
--- a/res/drawable-hdpi/dial_num_pound_wht.png
+++ b/res/drawable-hdpi/dial_num_pound_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/dial_num_star_wht.png b/res/drawable-hdpi/dial_num_star_wht.png
index 4271556..832031f 100644
--- a/res/drawable-hdpi/dial_num_star_wht.png
+++ b/res/drawable-hdpi/dial_num_star_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_call_log_home.png b/res/drawable-hdpi/ic_call_log_home.png
new file mode 100644
index 0000000..c7c8f16
--- /dev/null
+++ b/res/drawable-hdpi/ic_call_log_home.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_call_log_list_incoming_call.png b/res/drawable-hdpi/ic_call_log_list_incoming_call.png
index c98cd39..624a0c5 100644
--- a/res/drawable-hdpi/ic_call_log_list_incoming_call.png
+++ b/res/drawable-hdpi/ic_call_log_list_incoming_call.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_call_log_list_missed_call.png b/res/drawable-hdpi/ic_call_log_list_missed_call.png
index c52efbc..bd572cd 100644
--- a/res/drawable-hdpi/ic_call_log_list_missed_call.png
+++ b/res/drawable-hdpi/ic_call_log_list_missed_call.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_call_log_list_outgoing_call.png b/res/drawable-hdpi/ic_call_log_list_outgoing_call.png
index 4204953..1a93a78 100644
--- a/res/drawable-hdpi/ic_call_log_list_outgoing_call.png
+++ b/res/drawable-hdpi/ic_call_log_list_outgoing_call.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_call_log_list_voicemail.png b/res/drawable-hdpi/ic_call_log_list_voicemail.png
index d2ee44f..0c2a6f4 100644
--- a/res/drawable-hdpi/ic_call_log_list_voicemail.png
+++ b/res/drawable-hdpi/ic_call_log_list_voicemail.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_phone.png b/res/drawable-hdpi/ic_launcher_phone.png
new file mode 100644
index 0000000..0943ce5
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_overflow.png b/res/drawable-hdpi/ic_menu_overflow.png
new file mode 100644
index 0000000..84ac9ea
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_overflow.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_call_pressed.png b/res/drawable-mdpi/btn_call_pressed.png
new file mode 100644
index 0000000..b5c49de
--- /dev/null
+++ b/res/drawable-mdpi/btn_call_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_pressed.9.png b/res/drawable-mdpi/btn_dial_pressed.9.png
deleted file mode 100644
index 6fd3e44..0000000
--- a/res/drawable-mdpi/btn_dial_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_pressed.png b/res/drawable-mdpi/btn_dial_pressed.png
new file mode 100644
index 0000000..a39a2ba
--- /dev/null
+++ b/res/drawable-mdpi/btn_dial_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi/call_log_action_bar_bg.9.png b/res/drawable-mdpi/call_log_action_bar_bg.9.png
new file mode 100644
index 0000000..2e4d0ca
--- /dev/null
+++ b/res/drawable-mdpi/call_log_action_bar_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_background_texture.png b/res/drawable-mdpi/dial_background_texture.png
new file mode 100644
index 0000000..ea27fd2
--- /dev/null
+++ b/res/drawable-mdpi/dial_background_texture.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_0_wht.png b/res/drawable-mdpi/dial_num_0_wht.png
index 81a2e46..f37be81 100644
--- a/res/drawable-mdpi/dial_num_0_wht.png
+++ b/res/drawable-mdpi/dial_num_0_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_1_wht.png b/res/drawable-mdpi/dial_num_1_wht.png
new file mode 100644
index 0000000..3e11285
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_1_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_2_wht.png b/res/drawable-mdpi/dial_num_2_wht.png
index 129224f..bfcf48f 100644
--- a/res/drawable-mdpi/dial_num_2_wht.png
+++ b/res/drawable-mdpi/dial_num_2_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_3_wht.png b/res/drawable-mdpi/dial_num_3_wht.png
index 7828567..c37fdcf 100644
--- a/res/drawable-mdpi/dial_num_3_wht.png
+++ b/res/drawable-mdpi/dial_num_3_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_4_wht.png b/res/drawable-mdpi/dial_num_4_wht.png
index 730a4d8..d4144ee 100644
--- a/res/drawable-mdpi/dial_num_4_wht.png
+++ b/res/drawable-mdpi/dial_num_4_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_5_wht.png b/res/drawable-mdpi/dial_num_5_wht.png
index 8d5a6b3..3984429 100644
--- a/res/drawable-mdpi/dial_num_5_wht.png
+++ b/res/drawable-mdpi/dial_num_5_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_6_wht.png b/res/drawable-mdpi/dial_num_6_wht.png
index d2bc13d..dfd95f9 100644
--- a/res/drawable-mdpi/dial_num_6_wht.png
+++ b/res/drawable-mdpi/dial_num_6_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_7_wht.png b/res/drawable-mdpi/dial_num_7_wht.png
index 41c29ae..9bf517f 100644
--- a/res/drawable-mdpi/dial_num_7_wht.png
+++ b/res/drawable-mdpi/dial_num_7_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_8_wht.png b/res/drawable-mdpi/dial_num_8_wht.png
index b070426..0077cc5 100644
--- a/res/drawable-mdpi/dial_num_8_wht.png
+++ b/res/drawable-mdpi/dial_num_8_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_9_wht.png b/res/drawable-mdpi/dial_num_9_wht.png
index 9392aae..0c4e43f 100644
--- a/res/drawable-mdpi/dial_num_9_wht.png
+++ b/res/drawable-mdpi/dial_num_9_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_pound_wht.png b/res/drawable-mdpi/dial_num_pound_wht.png
index c9a1535..e2c65ad 100644
--- a/res/drawable-mdpi/dial_num_pound_wht.png
+++ b/res/drawable-mdpi/dial_num_pound_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_star_wht.png b/res/drawable-mdpi/dial_num_star_wht.png
index 4030646..1c9a09a 100644
--- a/res/drawable-mdpi/dial_num_star_wht.png
+++ b/res/drawable-mdpi/dial_num_star_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_call_log_home.png b/res/drawable-mdpi/ic_call_log_home.png
new file mode 100644
index 0000000..c7c8f16
--- /dev/null
+++ b/res/drawable-mdpi/ic_call_log_home.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_call_log_list_incoming_call.png b/res/drawable-mdpi/ic_call_log_list_incoming_call.png
index c98cd39..77be776 100644
--- a/res/drawable-mdpi/ic_call_log_list_incoming_call.png
+++ b/res/drawable-mdpi/ic_call_log_list_incoming_call.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_call_log_list_missed_call.png b/res/drawable-mdpi/ic_call_log_list_missed_call.png
index c52efbc..66c8d85 100644
--- a/res/drawable-mdpi/ic_call_log_list_missed_call.png
+++ b/res/drawable-mdpi/ic_call_log_list_missed_call.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_call_log_list_outgoing_call.png b/res/drawable-mdpi/ic_call_log_list_outgoing_call.png
index 4204953..a7f85b2 100644
--- a/res/drawable-mdpi/ic_call_log_list_outgoing_call.png
+++ b/res/drawable-mdpi/ic_call_log_list_outgoing_call.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_call_log_list_voicemail.png b/res/drawable-mdpi/ic_call_log_list_voicemail.png
index d2ee44f..6aec9ed 100644
--- a/res/drawable-mdpi/ic_call_log_list_voicemail.png
+++ b/res/drawable-mdpi/ic_call_log_list_voicemail.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_phone.png b/res/drawable-mdpi/ic_launcher_phone.png
new file mode 100644
index 0000000..724f94a
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_overflow.png b/res/drawable-mdpi/ic_menu_overflow.png
new file mode 100644
index 0000000..bc2ea5e
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_overflow.png
Binary files differ
diff --git a/res/drawable-xhdpi/aggregation_suggestions_bg.9.png b/res/drawable-xhdpi/aggregation_suggestions_bg.9.png
new file mode 100644
index 0000000..d3be1d6
--- /dev/null
+++ b/res/drawable-xhdpi/aggregation_suggestions_bg.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/aggregation_suggestions_bg_light_holo.9.png b/res/drawable-xhdpi/aggregation_suggestions_bg_light_holo.9.png
new file mode 100644
index 0000000..14e1386
--- /dev/null
+++ b/res/drawable-xhdpi/aggregation_suggestions_bg_light_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/badge_action_call.png b/res/drawable-xhdpi/badge_action_call.png
new file mode 100644
index 0000000..aa28018
--- /dev/null
+++ b/res/drawable-xhdpi/badge_action_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/badge_action_sms.png b/res/drawable-xhdpi/badge_action_sms.png
new file mode 100644
index 0000000..5e4cd82
--- /dev/null
+++ b/res/drawable-xhdpi/badge_action_sms.png
Binary files differ
diff --git a/res/drawable-xhdpi/bg_blk_search_contact.9.png b/res/drawable-xhdpi/bg_blk_search_contact.9.png
new file mode 100644
index 0000000..691a89c
--- /dev/null
+++ b/res/drawable-xhdpi/bg_blk_search_contact.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/bg_status_contact_widget.9.png b/res/drawable-xhdpi/bg_status_contact_widget.9.png
new file mode 100644
index 0000000..c735ce3
--- /dev/null
+++ b/res/drawable-xhdpi/bg_status_contact_widget.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_call_pressed.png b/res/drawable-xhdpi/btn_call_pressed.png
new file mode 100644
index 0000000..17e397b
--- /dev/null
+++ b/res/drawable-xhdpi/btn_call_pressed.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_left_disable.9.png b/res/drawable-xhdpi/btn_dial_action_left_disable.9.png
new file mode 100644
index 0000000..e6dd9a2
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_left_disable.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_left_disable_focused.9.png b/res/drawable-xhdpi/btn_dial_action_left_disable_focused.9.png
new file mode 100644
index 0000000..c369c17
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_left_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_left_normal.9.png b/res/drawable-xhdpi/btn_dial_action_left_normal.9.png
new file mode 100644
index 0000000..cdc0d1f
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_left_normal.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_left_pressed.9.png b/res/drawable-xhdpi/btn_dial_action_left_pressed.9.png
new file mode 100644
index 0000000..63af3aa
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_left_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_left_selected.9.png b/res/drawable-xhdpi/btn_dial_action_left_selected.9.png
new file mode 100644
index 0000000..05ecf0c
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_left_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_middle_disable.9.png b/res/drawable-xhdpi/btn_dial_action_middle_disable.9.png
new file mode 100644
index 0000000..baa74b1
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_middle_disable.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_middle_disable_focused.9.png b/res/drawable-xhdpi/btn_dial_action_middle_disable_focused.9.png
new file mode 100644
index 0000000..4519af8
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_middle_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_middle_normal.9.png b/res/drawable-xhdpi/btn_dial_action_middle_normal.9.png
new file mode 100644
index 0000000..87a1eb6
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_middle_normal.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_middle_pressed.9.png b/res/drawable-xhdpi/btn_dial_action_middle_pressed.9.png
new file mode 100644
index 0000000..f4ba914
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_middle_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_middle_selected.9.png b/res/drawable-xhdpi/btn_dial_action_middle_selected.9.png
new file mode 100644
index 0000000..bcd55d1
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_middle_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_right_disable.9.png b/res/drawable-xhdpi/btn_dial_action_right_disable.9.png
new file mode 100644
index 0000000..96da3e5
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_right_disable.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_right_disable_focused.9.png b/res/drawable-xhdpi/btn_dial_action_right_disable_focused.9.png
new file mode 100644
index 0000000..a91cade
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_right_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_right_normal.9.png b/res/drawable-xhdpi/btn_dial_action_right_normal.9.png
new file mode 100644
index 0000000..5373a47
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_right_normal.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_right_pressed.9.png b/res/drawable-xhdpi/btn_dial_action_right_pressed.9.png
new file mode 100644
index 0000000..cf1bd27
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_right_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_action_right_selected.9.png b/res/drawable-xhdpi/btn_dial_action_right_selected.9.png
new file mode 100644
index 0000000..be86501
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_action_right_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_normal.9.png b/res/drawable-xhdpi/btn_dial_normal.9.png
new file mode 100644
index 0000000..766470e
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_normal.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_pressed.png b/res/drawable-xhdpi/btn_dial_pressed.png
new file mode 100644
index 0000000..fe0bfe9
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_pressed.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_selected.9.png b/res/drawable-xhdpi/btn_dial_selected.9.png
new file mode 100644
index 0000000..f436288
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_activated.9.png b/res/drawable-xhdpi/btn_dial_textfield_activated.9.png
new file mode 100644
index 0000000..3602fa8
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_textfield_activated.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_normal.9.png b/res/drawable-xhdpi/btn_dial_textfield_normal.9.png
new file mode 100644
index 0000000..cbe790e
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_textfield_normal.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_pressed.9.png b/res/drawable-xhdpi/btn_dial_textfield_pressed.9.png
new file mode 100644
index 0000000..17f76b0
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_textfield_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_selected.9.png b/res/drawable-xhdpi/btn_dial_textfield_selected.9.png
new file mode 100644
index 0000000..25526c0
--- /dev/null
+++ b/res/drawable-xhdpi/btn_dial_textfield_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_focused_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_focused_holo_light.9.png
new file mode 100644
index 0000000..7dbd1e6
--- /dev/null
+++ b/res/drawable-xhdpi/change_photo_box_focused_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png
new file mode 100644
index 0000000..7e1e97f
--- /dev/null
+++ b/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png
new file mode 100644
index 0000000..e98266f
--- /dev/null
+++ b/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/contacts_widget_preview.png b/res/drawable-xhdpi/contacts_widget_preview.png
new file mode 100644
index 0000000..65ac914
--- /dev/null
+++ b/res/drawable-xhdpi/contacts_widget_preview.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_background_texture.png b/res/drawable-xhdpi/dial_background_texture.png
new file mode 100644
index 0000000..2318e54
--- /dev/null
+++ b/res/drawable-xhdpi/dial_background_texture.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_indicator.png b/res/drawable-xhdpi/dial_indicator.png
new file mode 100644
index 0000000..384d9c2
--- /dev/null
+++ b/res/drawable-xhdpi/dial_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_0_wht.png b/res/drawable-xhdpi/dial_num_0_wht.png
index c5f032f..08042b3 100644
--- a/res/drawable-xhdpi/dial_num_0_wht.png
+++ b/res/drawable-xhdpi/dial_num_0_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_1_wht.png b/res/drawable-xhdpi/dial_num_1_wht.png
new file mode 100644
index 0000000..2bf0bc0
--- /dev/null
+++ b/res/drawable-xhdpi/dial_num_1_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_2_wht.png b/res/drawable-xhdpi/dial_num_2_wht.png
index 3512386..8a096f1 100644
--- a/res/drawable-xhdpi/dial_num_2_wht.png
+++ b/res/drawable-xhdpi/dial_num_2_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_3_wht.png b/res/drawable-xhdpi/dial_num_3_wht.png
index c2be01e..73536dc 100644
--- a/res/drawable-xhdpi/dial_num_3_wht.png
+++ b/res/drawable-xhdpi/dial_num_3_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_4_wht.png b/res/drawable-xhdpi/dial_num_4_wht.png
index eb9f4e2..a8ce584 100644
--- a/res/drawable-xhdpi/dial_num_4_wht.png
+++ b/res/drawable-xhdpi/dial_num_4_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_5_wht.png b/res/drawable-xhdpi/dial_num_5_wht.png
index 8da8c82..acb1351 100644
--- a/res/drawable-xhdpi/dial_num_5_wht.png
+++ b/res/drawable-xhdpi/dial_num_5_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_6_wht.png b/res/drawable-xhdpi/dial_num_6_wht.png
index c7a89fb..4926653 100644
--- a/res/drawable-xhdpi/dial_num_6_wht.png
+++ b/res/drawable-xhdpi/dial_num_6_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_7_wht.png b/res/drawable-xhdpi/dial_num_7_wht.png
index e532501..1c6c1c2 100644
--- a/res/drawable-xhdpi/dial_num_7_wht.png
+++ b/res/drawable-xhdpi/dial_num_7_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_8_wht.png b/res/drawable-xhdpi/dial_num_8_wht.png
index bc3873b..b2a4546 100644
--- a/res/drawable-xhdpi/dial_num_8_wht.png
+++ b/res/drawable-xhdpi/dial_num_8_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_9_wht.png b/res/drawable-xhdpi/dial_num_9_wht.png
index 38c305f..c266e8b 100644
--- a/res/drawable-xhdpi/dial_num_9_wht.png
+++ b/res/drawable-xhdpi/dial_num_9_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_pound_wht.png b/res/drawable-xhdpi/dial_num_pound_wht.png
index 114ea7b..19376f0 100644
--- a/res/drawable-xhdpi/dial_num_pound_wht.png
+++ b/res/drawable-xhdpi/dial_num_pound_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_num_star_wht.png b/res/drawable-xhdpi/dial_num_star_wht.png
index 64c1153..35ec837 100644
--- a/res/drawable-xhdpi/dial_num_star_wht.png
+++ b/res/drawable-xhdpi/dial_num_star_wht.png
Binary files differ
diff --git a/res/drawable-xhdpi/frame_thumbnail_contact_widget_focused_holo.png b/res/drawable-xhdpi/frame_thumbnail_contact_widget_focused_holo.png
new file mode 100644
index 0000000..a05ca8a
--- /dev/null
+++ b/res/drawable-xhdpi/frame_thumbnail_contact_widget_focused_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/frame_thumbnail_contact_widget_holo.png b/res/drawable-xhdpi/frame_thumbnail_contact_widget_holo.png
new file mode 100644
index 0000000..bf2e4a8
--- /dev/null
+++ b/res/drawable-xhdpi/frame_thumbnail_contact_widget_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/frame_thumbnail_contact_widget_pressed_holo.png b/res/drawable-xhdpi/frame_thumbnail_contact_widget_pressed_holo.png
new file mode 100644
index 0000000..6541c62
--- /dev/null
+++ b/res/drawable-xhdpi/frame_thumbnail_contact_widget_pressed_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_back_holo_dark.png b/res/drawable-xhdpi/ic_ab_back_holo_dark.png
new file mode 100644
index 0000000..737f7d5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_ab_back_holo_dark.png
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
new file mode 100644
index 0000000..0aa9b86
--- /dev/null
+++ b/res/drawable-xhdpi/ic_ab_dialer_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_favourites_holo_dark.png b/res/drawable-xhdpi/ic_ab_favourites_holo_dark.png
new file mode 100644
index 0000000..ac0d685
--- /dev/null
+++ b/res/drawable-xhdpi/ic_ab_favourites_holo_dark.png
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
new file mode 100644
index 0000000..d54e421
--- /dev/null
+++ b/res/drawable-xhdpi/ic_ab_history_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_search_holo_dark.png b/res/drawable-xhdpi/ic_ab_search_holo_dark.png
new file mode 100644
index 0000000..b4db2d3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_ab_search_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_contact_holo_dark.png b/res/drawable-xhdpi/ic_add_contact_holo_dark.png
new file mode 100644
index 0000000..862652e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_add_contact_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bluetooth_holo_dark.png b/res/drawable-xhdpi/ic_bluetooth_holo_dark.png
new file mode 100644
index 0000000..c213595
--- /dev/null
+++ b/res/drawable-xhdpi/ic_bluetooth_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_incoming_holo_dark.png b/res/drawable-xhdpi/ic_call_incoming_holo_dark.png
new file mode 100644
index 0000000..3671ff0
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_incoming_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_header_incoming_call.png b/res/drawable-xhdpi/ic_call_log_header_incoming_call.png
new file mode 100644
index 0000000..cae35d1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_log_header_incoming_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_header_missed_call.png b/res/drawable-xhdpi/ic_call_log_header_missed_call.png
new file mode 100644
index 0000000..cb7395c
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_log_header_missed_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_header_outgoing_call.png b/res/drawable-xhdpi/ic_call_log_header_outgoing_call.png
new file mode 100644
index 0000000..a17bdf3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_log_header_outgoing_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_list_incoming_call.png b/res/drawable-xhdpi/ic_call_log_list_incoming_call.png
new file mode 100644
index 0000000..31be214
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_log_list_incoming_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_list_missed_call.png b/res/drawable-xhdpi/ic_call_log_list_missed_call.png
new file mode 100644
index 0000000..b00e68a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_log_list_missed_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_log_list_outgoing_call.png b/res/drawable-xhdpi/ic_call_log_list_outgoing_call.png
new file mode 100644
index 0000000..6a19a96
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_log_list_outgoing_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_missed_holo_dark.png b/res/drawable-xhdpi/ic_call_missed_holo_dark.png
new file mode 100644
index 0000000..66129f2
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_missed_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_outgoing_holo_dark.png b/res/drawable-xhdpi/ic_call_outgoing_holo_dark.png
new file mode 100644
index 0000000..4b48928
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_outgoing_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_call_voicemail_holo_dark.png b/res/drawable-xhdpi/ic_call_voicemail_holo_dark.png
new file mode 100644
index 0000000..97443fb
--- /dev/null
+++ b/res/drawable-xhdpi/ic_call_voicemail_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_contact_list_picture.png b/res/drawable-xhdpi/ic_contact_list_picture.png
new file mode 100644
index 0000000..181005b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_contact_list_picture.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_contact_picture.png b/res/drawable-xhdpi/ic_contact_picture.png
new file mode 100644
index 0000000..e551140
--- /dev/null
+++ b/res/drawable-xhdpi/ic_contact_picture.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_contacts_details.png b/res/drawable-xhdpi/ic_contacts_details.png
new file mode 100644
index 0000000..8d72566
--- /dev/null
+++ b/res/drawable-xhdpi/ic_contacts_details.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_contacts_holo_dark.png b/res/drawable-xhdpi/ic_contacts_holo_dark.png
new file mode 100644
index 0000000..eb82880
--- /dev/null
+++ b/res/drawable-xhdpi/ic_contacts_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_default_number.png b/res/drawable-xhdpi/ic_default_number.png
new file mode 100644
index 0000000..972788d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_default_number.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dial_action_call.png b/res/drawable-xhdpi/ic_dial_action_call.png
new file mode 100644
index 0000000..ec0b482
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dial_action_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dial_action_delete.png b/res/drawable-xhdpi/ic_dial_action_delete.png
new file mode 100644
index 0000000..9505f9d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dial_action_delete.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dial_action_search.png b/res/drawable-xhdpi/ic_dial_action_search.png
new file mode 100644
index 0000000..ce9ad6e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dial_action_search.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dial_action_voice_mail.png b/res/drawable-xhdpi/ic_dial_action_voice_mail.png
new file mode 100644
index 0000000..8cad4d6
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dial_action_voice_mail.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialer_fork_add_call.png b/res/drawable-xhdpi/ic_dialer_fork_add_call.png
new file mode 100644
index 0000000..2c1f817
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialer_fork_add_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialer_fork_current_call.png b/res/drawable-xhdpi/ic_dialer_fork_current_call.png
new file mode 100644
index 0000000..b1c4008
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialer_fork_current_call.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialer_fork_tt_keypad.png b/res/drawable-xhdpi/ic_dialer_fork_tt_keypad.png
new file mode 100644
index 0000000..ccd8f8a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialer_fork_tt_keypad.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialpad_holo_dark.png b/res/drawable-xhdpi/ic_dialpad_holo_dark.png
new file mode 100644
index 0000000..c53ef55
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialpad_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fav_quickcontact_holo_dark.png b/res/drawable-xhdpi/ic_fav_quickcontact_holo_dark.png
new file mode 100644
index 0000000..2fe0804
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fav_quickcontact_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hold_pause_holo_dark.png b/res/drawable-xhdpi/ic_hold_pause_holo_dark.png
new file mode 100644
index 0000000..c5c5974
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hold_pause_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_incall_switch_holo_dark.png b/res/drawable-xhdpi/ic_incall_switch_holo_dark.png
new file mode 100644
index 0000000..d772306
--- /dev/null
+++ b/res/drawable-xhdpi/ic_incall_switch_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_contacts.png b/res/drawable-xhdpi/ic_launcher_contacts.png
new file mode 100644
index 0000000..1bb0a3f
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_folder_live_contacts.png b/res/drawable-xhdpi/ic_launcher_folder_live_contacts.png
new file mode 100644
index 0000000..99bb9f8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_folder_live_contacts.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_folder_live_contacts_phone.png b/res/drawable-xhdpi/ic_launcher_folder_live_contacts_phone.png
new file mode 100644
index 0000000..fd416b8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_folder_live_contacts_phone.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_folder_live_contacts_starred.png b/res/drawable-xhdpi/ic_launcher_folder_live_contacts_starred.png
new file mode 100644
index 0000000..ff9e326
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_folder_live_contacts_starred.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_phone.png b/res/drawable-xhdpi/ic_launcher_phone.png
new file mode 100644
index 0000000..6a454da
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_contact.png b/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
new file mode 100644
index 0000000..94c7da5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png b/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
new file mode 100644
index 0000000..42f8f0a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
new file mode 100644
index 0000000..babcc02
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_manage_holo_dark.png b/res/drawable-xhdpi/ic_manage_holo_dark.png
new file mode 100644
index 0000000..8cfba5e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_manage_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_2sec_pause.png b/res/drawable-xhdpi/ic_menu_2sec_pause.png
new file mode 100644
index 0000000..56f68b3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_2sec_pause.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_accounts_holo_light.png b/res/drawable-xhdpi/ic_menu_accounts_holo_light.png
new file mode 100644
index 0000000..e58c7c8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_accounts_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_contact_holo_light.png b/res/drawable-xhdpi/ic_menu_add_contact_holo_light.png
new file mode 100644
index 0000000..a28d8f4
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_add_contact_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_field_holo_light.png b/res/drawable-xhdpi/ic_menu_add_field_holo_light.png
new file mode 100644
index 0000000..1328290
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_add_field_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_add_group_holo_light.png b/res/drawable-xhdpi/ic_menu_add_group_holo_light.png
new file mode 100644
index 0000000..4e4665a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_add_group_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_compose_holo_light.png b/res/drawable-xhdpi/ic_menu_compose_holo_light.png
new file mode 100644
index 0000000..9561ce7
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_compose_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_contacts_holo_light.png b/res/drawable-xhdpi/ic_menu_contacts_holo_light.png
new file mode 100644
index 0000000..ac9cf65
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_contacts_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_display_all.png b/res/drawable-xhdpi/ic_menu_display_all.png
new file mode 100644
index 0000000..d30bcc5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_display_all.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_display_all_holo_light.png b/res/drawable-xhdpi/ic_menu_display_all_holo_light.png
new file mode 100644
index 0000000..0aa4cad
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_display_all_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_display_selected.png b/res/drawable-xhdpi/ic_menu_display_selected.png
new file mode 100644
index 0000000..3a34c94
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_display_selected.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_done_holo_light.png b/res/drawable-xhdpi/ic_menu_done_holo_light.png
new file mode 100644
index 0000000..a8a0972
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_done_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_expander_maximized_holo_light.png b/res/drawable-xhdpi/ic_menu_expander_maximized_holo_light.png
new file mode 100644
index 0000000..490371c
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_expander_maximized_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_expander_minimized_holo_light.png b/res/drawable-xhdpi/ic_menu_expander_minimized_holo_light.png
new file mode 100644
index 0000000..0e660ea
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_expander_minimized_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_help_holo_light.png b/res/drawable-xhdpi/ic_menu_help_holo_light.png
new file mode 100644
index 0000000..d1dcf17
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_help_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_import_export_holo_light.png b/res/drawable-xhdpi/ic_menu_import_export_holo_light.png
new file mode 100644
index 0000000..7b7d9da
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_import_export_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_mark.png b/res/drawable-xhdpi/ic_menu_mark.png
new file mode 100644
index 0000000..a24adc5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_mark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_merge_holo_light.png b/res/drawable-xhdpi/ic_menu_merge_holo_light.png
new file mode 100644
index 0000000..31bc346
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_merge_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_more_holo_light.png b/res/drawable-xhdpi/ic_menu_more_holo_light.png
new file mode 100644
index 0000000..5817ea8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_more_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png b/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000..141c712
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_overflow.png b/res/drawable-xhdpi/ic_menu_overflow.png
new file mode 100644
index 0000000..0abd760
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_overflow.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png b/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png
new file mode 100644
index 0000000..705833e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_remove_field_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_select.png b/res/drawable-xhdpi/ic_menu_select.png
new file mode 100644
index 0000000..8e4b5e1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_select.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_settings_holo_light.png b/res/drawable-xhdpi/ic_menu_settings_holo_light.png
new file mode 100644
index 0000000..68ba92b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_settings_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_share_holo_light.png b/res/drawable-xhdpi/ic_menu_share_holo_light.png
new file mode 100644
index 0000000..1c88e0e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_share_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_split_holo_light.png b/res/drawable-xhdpi/ic_menu_split_holo_light.png
new file mode 100644
index 0000000..16c6ade
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_split_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_star_holo_light.png b/res/drawable-xhdpi/ic_menu_star_holo_light.png
new file mode 100644
index 0000000..9067911
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_star_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_trash_holo_light.png b/res/drawable-xhdpi/ic_menu_trash_holo_light.png
new file mode 100644
index 0000000..d234d73
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_trash_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_unselect.png b/res/drawable-xhdpi/ic_menu_unselect.png
new file mode 100644
index 0000000..748523a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_unselect.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_wait.png b/res/drawable-xhdpi/ic_menu_wait.png
new file mode 100644
index 0000000..ee5ee68
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_wait.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_sound_holo_dark.png b/res/drawable-xhdpi/ic_sound_holo_dark.png
new file mode 100644
index 0000000..da5e9f6
--- /dev/null
+++ b/res/drawable-xhdpi/ic_sound_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_selected_contacts.png b/res/drawable-xhdpi/ic_tab_selected_contacts.png
new file mode 100644
index 0000000..f8e6085
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_selected_contacts.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_selected_dialer.png b/res/drawable-xhdpi/ic_tab_selected_dialer.png
new file mode 100644
index 0000000..2cee915
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_selected_dialer.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_selected_recent.png b/res/drawable-xhdpi/ic_tab_selected_recent.png
new file mode 100644
index 0000000..ddedc4b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_selected_recent.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_selected_starred.png b/res/drawable-xhdpi/ic_tab_selected_starred.png
new file mode 100644
index 0000000..70f0ddc
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_selected_starred.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_unselected_contacts.png b/res/drawable-xhdpi/ic_tab_unselected_contacts.png
new file mode 100644
index 0000000..7adc0f5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_unselected_contacts.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_unselected_dialer.png b/res/drawable-xhdpi/ic_tab_unselected_dialer.png
new file mode 100644
index 0000000..3116f83
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_unselected_dialer.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_unselected_recent.png b/res/drawable-xhdpi/ic_tab_unselected_recent.png
new file mode 100644
index 0000000..e7d4d4f
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_unselected_recent.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_unselected_starred.png b/res/drawable-xhdpi/ic_tab_unselected_starred.png
new file mode 100644
index 0000000..67b4a9d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_unselected_starred.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_text_holo_dark.png b/res/drawable-xhdpi/ic_text_holo_dark.png
new file mode 100644
index 0000000..74d20e7
--- /dev/null
+++ b/res/drawable-xhdpi/ic_text_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/infobar_dark.9.png b/res/drawable-xhdpi/infobar_dark.9.png
new file mode 100644
index 0000000..24ed9a2
--- /dev/null
+++ b/res/drawable-xhdpi/infobar_dark.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_activated_holo.9.png b/res/drawable-xhdpi/list_activated_holo.9.png
new file mode 100644
index 0000000..bb9a7f9
--- /dev/null
+++ b/res/drawable-xhdpi/list_activated_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_background_holo.9.png b/res/drawable-xhdpi/list_background_holo.9.png
new file mode 100644
index 0000000..de090c8
--- /dev/null
+++ b/res/drawable-xhdpi/list_background_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_focused_holo.9.png b/res/drawable-xhdpi/list_focused_holo.9.png
new file mode 100644
index 0000000..6051708
--- /dev/null
+++ b/res/drawable-xhdpi/list_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_item_divider.9.png b/res/drawable-xhdpi/list_item_divider.9.png
new file mode 100644
index 0000000..fd799ef
--- /dev/null
+++ b/res/drawable-xhdpi/list_item_divider.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_item_divider_holo.9.png b/res/drawable-xhdpi/list_item_divider_holo.9.png
new file mode 100644
index 0000000..9fdfc95
--- /dev/null
+++ b/res/drawable-xhdpi/list_item_divider_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_pressed_holo.9.png b/res/drawable-xhdpi/list_pressed_holo.9.png
new file mode 100644
index 0000000..f4b4c38
--- /dev/null
+++ b/res/drawable-xhdpi/list_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/list_title_holo.9.png b/res/drawable-xhdpi/list_title_holo.9.png
new file mode 100644
index 0000000..0f3421c
--- /dev/null
+++ b/res/drawable-xhdpi/list_title_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/magnifying_glass.png b/res/drawable-xhdpi/magnifying_glass.png
new file mode 100644
index 0000000..9066772
--- /dev/null
+++ b/res/drawable-xhdpi/magnifying_glass.png
Binary files differ
diff --git a/res/drawable-xhdpi/panel_content.9.png b/res/drawable-xhdpi/panel_content.9.png
new file mode 100644
index 0000000..e0b20de
--- /dev/null
+++ b/res/drawable-xhdpi/panel_content.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/panel_message.9.png b/res/drawable-xhdpi/panel_message.9.png
new file mode 100644
index 0000000..ddef3cf
--- /dev/null
+++ b/res/drawable-xhdpi/panel_message.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/photo_frame_widget_holo_light.9.png b/res/drawable-xhdpi/photo_frame_widget_holo_light.9.png
new file mode 100644
index 0000000..9f21a87
--- /dev/null
+++ b/res/drawable-xhdpi/photo_frame_widget_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_arrowdown_left_holo_light.9.png b/res/drawable-xhdpi/quickactions_arrowdown_left_holo_light.9.png
new file mode 100644
index 0000000..12e2988
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_arrowdown_left_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_arrowdown_middle_holo_light.9.png b/res/drawable-xhdpi/quickactions_arrowdown_middle_holo_light.9.png
new file mode 100644
index 0000000..bff78a4
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_arrowdown_middle_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_arrowdown_right_holo_light.9.png b/res/drawable-xhdpi/quickactions_arrowdown_right_holo_light.9.png
new file mode 100644
index 0000000..1ef7191
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_arrowdown_right_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_arrowup_left_holo_light.9.png b/res/drawable-xhdpi/quickactions_arrowup_left_holo_light.9.png
new file mode 100644
index 0000000..cf280d9
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_arrowup_left_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_arrowup_middle_holo_light.9.png b/res/drawable-xhdpi/quickactions_arrowup_middle_holo_light.9.png
new file mode 100644
index 0000000..b5d9a0d
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_arrowup_middle_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_arrowup_right_holo_light.9.png b/res/drawable-xhdpi/quickactions_arrowup_right_holo_light.9.png
new file mode 100644
index 0000000..6c6a99c
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_arrowup_right_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickactions_icon_activated.9.png b/res/drawable-xhdpi/quickactions_icon_activated.9.png
new file mode 100644
index 0000000..c24607a
--- /dev/null
+++ b/res/drawable-xhdpi/quickactions_icon_activated.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/quickcontacts_selected_holo.9.png b/res/drawable-xhdpi/quickcontacts_selected_holo.9.png
new file mode 100644
index 0000000..081233f
--- /dev/null
+++ b/res/drawable-xhdpi/quickcontacts_selected_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/section_header.9.png b/res/drawable-xhdpi/section_header.9.png
new file mode 100644
index 0000000..f4ae934
--- /dev/null
+++ b/res/drawable-xhdpi/section_header.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/statusbox_attribute_holo.9.png b/res/drawable-xhdpi/statusbox_attribute_holo.9.png
new file mode 100644
index 0000000..b2b82e4
--- /dev/null
+++ b/res/drawable-xhdpi/statusbox_attribute_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/statusbox_landscape_holo_light.9.png b/res/drawable-xhdpi/statusbox_landscape_holo_light.9.png
new file mode 100644
index 0000000..345c227
--- /dev/null
+++ b/res/drawable-xhdpi/statusbox_landscape_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/statusbox_portrait_holo_light.9.png b/res/drawable-xhdpi/statusbox_portrait_holo_light.9.png
new file mode 100644
index 0000000..914d5e0
--- /dev/null
+++ b/res/drawable-xhdpi/statusbox_portrait_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_add.png b/res/drawable-xhdpi/sym_action_add.png
new file mode 100644
index 0000000..32f8e22
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_add.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_audiochat_holo_light.png b/res/drawable-xhdpi/sym_action_audiochat_holo_light.png
new file mode 100644
index 0000000..163e632
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_audiochat_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_email.png b/res/drawable-xhdpi/sym_action_email.png
new file mode 100644
index 0000000..4acedd4
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_email.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_email_holo_light.png b/res/drawable-xhdpi/sym_action_email_holo_light.png
new file mode 100644
index 0000000..e64a7ae
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_email_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_goto_website_holo_light.png b/res/drawable-xhdpi/sym_action_goto_website_holo_light.png
new file mode 100644
index 0000000..48873f4
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_goto_website_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_map.png b/res/drawable-xhdpi/sym_action_map.png
new file mode 100644
index 0000000..87e71ae
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_map.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_show_map_holo_light.png b/res/drawable-xhdpi/sym_action_show_map_holo_light.png
new file mode 100644
index 0000000..1c948f6
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_show_map_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_sms.png b/res/drawable-xhdpi/sym_action_sms.png
new file mode 100644
index 0000000..5003be1
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_sms.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_talk_holo_light.png b/res/drawable-xhdpi/sym_action_talk_holo_light.png
new file mode 100644
index 0000000..759c7e8
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_talk_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_videochat_holo_light.png b/res/drawable-xhdpi/sym_action_videochat_holo_light.png
new file mode 100644
index 0000000..1ec2f63
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_videochat_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/sym_action_view_contact.png b/res/drawable-xhdpi/sym_action_view_contact.png
new file mode 100644
index 0000000..2c14e56
--- /dev/null
+++ b/res/drawable-xhdpi/sym_action_view_contact.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_focused.9.png b/res/drawable-xhdpi/tab_focused.9.png
new file mode 100644
index 0000000..1ef66d9
--- /dev/null
+++ b/res/drawable-xhdpi/tab_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_focused_bottom.9.png b/res/drawable-xhdpi/tab_focused_bottom.9.png
new file mode 100644
index 0000000..a30fcb9
--- /dev/null
+++ b/res/drawable-xhdpi/tab_focused_bottom.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_left_arrow.png b/res/drawable-xhdpi/tab_left_arrow.png
new file mode 100644
index 0000000..9a2eef2
--- /dev/null
+++ b/res/drawable-xhdpi/tab_left_arrow.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_pressed.9.png b/res/drawable-xhdpi/tab_pressed.9.png
new file mode 100644
index 0000000..0d752fc
--- /dev/null
+++ b/res/drawable-xhdpi/tab_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_pressed_bottom.9.png b/res/drawable-xhdpi/tab_pressed_bottom.9.png
new file mode 100644
index 0000000..d1a4427
--- /dev/null
+++ b/res/drawable-xhdpi/tab_pressed_bottom.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_right_arrow.png b/res/drawable-xhdpi/tab_right_arrow.png
new file mode 100644
index 0000000..64a20ff
--- /dev/null
+++ b/res/drawable-xhdpi/tab_right_arrow.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected.9.png b/res/drawable-xhdpi/tab_selected.9.png
new file mode 100644
index 0000000..c732f0d
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_bottom.9.png b/res/drawable-xhdpi/tab_selected_bottom.9.png
new file mode 100644
index 0000000..d708d55
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_bottom.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected.9.png b/res/drawable-xhdpi/tab_unselected.9.png
new file mode 100644
index 0000000..a650f69
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/title_bar_medium.9.png b/res/drawable-xhdpi/title_bar_medium.9.png
new file mode 100644
index 0000000..2b296ea
--- /dev/null
+++ b/res/drawable-xhdpi/title_bar_medium.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/title_bar_shadow.9.png b/res/drawable-xhdpi/title_bar_shadow.9.png
new file mode 100644
index 0000000..310ac75
--- /dev/null
+++ b/res/drawable-xhdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/unknown_source.png b/res/drawable-xhdpi/unknown_source.png
new file mode 100644
index 0000000..35e8fb4
--- /dev/null
+++ b/res/drawable-xhdpi/unknown_source.png
Binary files differ
diff --git a/res/values/config.xml b/res/drawable/btn_call.xml
similarity index 67%
copy from res/values/config.xml
copy to res/drawable/btn_call.xml
index 6ebaa1f..82f08f4 100644
--- a/res/values/config.xml
+++ b/res/drawable/btn_call.xml
@@ -14,11 +14,10 @@
limitations under the License.
-->
-<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
-</resources>
+<!-- Background resource for call button in the various dialpads -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_call_pressed" />
+ <item
+ android:drawable="@android:color/transparent" />
+</selector>
diff --git a/res/drawable/btn_dial.xml b/res/drawable/btn_dial.xml
index 22a785a..2a577e0 100644
--- a/res/drawable/btn_dial.xml
+++ b/res/drawable/btn_dial.xml
@@ -22,6 +22,7 @@
android:drawable="@drawable/btn_dial_pressed" />
<item android:state_focused="true"
android:drawable="@drawable/btn_dial_selected" />
+
<item
- android:drawable="@drawable/btn_dial_normal" />
+ android:drawable="@android:color/transparent" />
</selector>
diff --git a/res/drawable/dial_num_0.xml b/res/drawable/dial_num_0.xml
index cd4d727..cc82dcf 100644
--- a/res/drawable/dial_num_0.xml
+++ b/res/drawable/dial_num_0.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_0_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_0_blk" />
+ android:drawable="@drawable/dial_num_0_blk" /> -->
<item
android:drawable="@drawable/dial_num_0_wht" />
</selector>
diff --git a/res/values/config.xml b/res/drawable/dial_num_1.xml
similarity index 60%
copy from res/values/config.xml
copy to res/drawable/dial_num_1.xml
index 6ebaa1f..a102ac8 100644
--- a/res/values/config.xml
+++ b/res/drawable/dial_num_1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!-- 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.
@@ -14,11 +14,11 @@
limitations under the License.
-->
-<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- <item android:state_pressed="true"
+ android:drawable="@drawable/dial_num_1" />
+ <item android:state_focused="true"
+ android:drawable="@drawable/dial_num_1" /> -->
+ <item
+ android:drawable="@drawable/dial_num_1_wht" />
+</selector>
diff --git a/res/drawable/dial_num_1_no_vm.xml b/res/drawable/dial_num_1_no_vm.xml
index daa4613..201c4d2 100644
--- a/res/drawable/dial_num_1_no_vm.xml
+++ b/res/drawable/dial_num_1_no_vm.xml
@@ -22,4 +22,3 @@
<item
android:drawable="@drawable/dial_num_1_no_vm_wht" />
</selector>
-
diff --git a/res/drawable/dial_num_2.xml b/res/drawable/dial_num_2.xml
index 1a087f6..57c3ce6 100644
--- a/res/drawable/dial_num_2.xml
+++ b/res/drawable/dial_num_2.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_2_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_2_blk" />
+ android:drawable="@drawable/dial_num_2_blk" /> -->
<item
android:drawable="@drawable/dial_num_2_wht" />
</selector>
diff --git a/res/drawable/dial_num_3.xml b/res/drawable/dial_num_3.xml
index dda794a..e2b4b40 100644
--- a/res/drawable/dial_num_3.xml
+++ b/res/drawable/dial_num_3.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_3_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_3_blk" />
+ android:drawable="@drawable/dial_num_3_blk" /> -->
<item
android:drawable="@drawable/dial_num_3_wht" />
</selector>
diff --git a/res/drawable/dial_num_4.xml b/res/drawable/dial_num_4.xml
index 511e58b..814b16a 100644
--- a/res/drawable/dial_num_4.xml
+++ b/res/drawable/dial_num_4.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_4_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_4_blk" />
+ android:drawable="@drawable/dial_num_4_blk" /> -->
<item
android:drawable="@drawable/dial_num_4_wht" />
</selector>
diff --git a/res/drawable/dial_num_5.xml b/res/drawable/dial_num_5.xml
index a857bc7..e9cc3ad 100644
--- a/res/drawable/dial_num_5.xml
+++ b/res/drawable/dial_num_5.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_5_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_5_blk" />
+ android:drawable="@drawable/dial_num_5_blk" /> -->
<item
android:drawable="@drawable/dial_num_5_wht" />
</selector>
diff --git a/res/drawable/dial_num_6.xml b/res/drawable/dial_num_6.xml
index b494458..8f78add 100644
--- a/res/drawable/dial_num_6.xml
+++ b/res/drawable/dial_num_6.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_6_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_6_blk" />
+ android:drawable="@drawable/dial_num_6_blk" /> -->
<item
android:drawable="@drawable/dial_num_6_wht" />
</selector>
diff --git a/res/drawable/dial_num_7.xml b/res/drawable/dial_num_7.xml
index a22c894..1d255a2 100644
--- a/res/drawable/dial_num_7.xml
+++ b/res/drawable/dial_num_7.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_7_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_7_blk" />
+ android:drawable="@drawable/dial_num_7_blk" /> -->
<item
android:drawable="@drawable/dial_num_7_wht" />
</selector>
diff --git a/res/drawable/dial_num_8.xml b/res/drawable/dial_num_8.xml
index 8ac7930..2b7eb11 100644
--- a/res/drawable/dial_num_8.xml
+++ b/res/drawable/dial_num_8.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_8_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_8_blk" />
+ android:drawable="@drawable/dial_num_8_blk" /> -->
<item
android:drawable="@drawable/dial_num_8_wht" />
</selector>
diff --git a/res/drawable/dial_num_9.xml b/res/drawable/dial_num_9.xml
index d0b7fd9..ae019ed 100644
--- a/res/drawable/dial_num_9.xml
+++ b/res/drawable/dial_num_9.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_9_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_9_blk" />
+ android:drawable="@drawable/dial_num_9_blk" /> -->
<item
android:drawable="@drawable/dial_num_9_wht" />
</selector>
diff --git a/res/drawable/dial_num_pound.xml b/res/drawable/dial_num_pound.xml
index 609d748..c9c1e6f 100644
--- a/res/drawable/dial_num_pound.xml
+++ b/res/drawable/dial_num_pound.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_pound_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_pound_blk" />
+ android:drawable="@drawable/dial_num_pound_blk" /> -->
<item
android:drawable="@drawable/dial_num_pound_wht" />
</selector>
diff --git a/res/drawable/dial_num_star.xml b/res/drawable/dial_num_star.xml
index 3b3304a..af3c20e 100644
--- a/res/drawable/dial_num_star.xml
+++ b/res/drawable/dial_num_star.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
+ <!-- <item android:state_pressed="true"
android:drawable="@drawable/dial_num_star_blk" />
<item android:state_focused="true"
- android:drawable="@drawable/dial_num_star_blk" />
+ android:drawable="@drawable/dial_num_star_blk" /> -->
<item
android:drawable="@drawable/dial_num_star_wht" />
</selector>
diff --git a/res/values/config.xml b/res/drawable/dialpad_background.xml
similarity index 69%
copy from res/values/config.xml
copy to res/drawable/dialpad_background.xml
index 6ebaa1f..0e31f5e 100644
--- a/res/values/config.xml
+++ b/res/drawable/dialpad_background.xml
@@ -14,11 +14,6 @@
limitations under the License.
-->
-<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
-</resources>
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/dial_background_texture"
+ android:tileMode="repeat" />
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_container.xml b/res/layout-sw580dp-w1000dp/contact_detail_container.xml
new file mode 100644
index 0000000..b6a6319
--- /dev/null
+++ b/res/layout-sw580dp-w1000dp/contact_detail_container.xml
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<!--
+ Two-column layout for a contact with social updates. If the contact does not
+ have social updates, then the second fragment view will just be hidden.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scrollbars="none"
+ android:orientation="horizontal">
+
+ <fragment class="com.android.contacts.detail.ContactDetailFragment"
+ android:id="@+id/about_fragment"
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="3" />
+
+ <fragment class="com.android.contacts.detail.ContactDetailUpdatesFragment"
+ android:id="@+id/updates_fragment"
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="2" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-sw580dp/people_activity.xml b/res/layout-sw580dp/people_activity.xml
index 6d702e7..7301d24 100644
--- a/res/layout-sw580dp/people_activity.xml
+++ b/res/layout-sw580dp/people_activity.xml
@@ -79,16 +79,27 @@
ex:animationDuration="200"
android:visibility="gone">
- <fragment
- android:id="@+id/contact_detail_fragment"
- class="com.android.contacts.detail.ContactDetailFragment"
+ <!-- This layout includes all possible views needed for a contact detail page -->
+ <include
+ layout="@layout/contact_detail_container"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"/>
+
+ <!-- This invisible worker fragment loads the contact's details -->
+ <fragment
+ android:id="@+id/contact_detail_loader_fragment"
+ class="com.android.contacts.detail.ContactLoaderFragment"
+ android:layout_height="0dip"
+ android:layout_width="0dip"
+ android:visibility="gone"/>
+
+ <!-- This is the group detail page -->
<fragment
android:id="@+id/group_detail_fragment"
class="com.android.contacts.group.GroupDetailFragment"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:visibility="gone" />
</view>
<view
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index 83c8f1b..1fe6faa 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -19,100 +19,91 @@
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="top"
- android:paddingTop="?attr/call_detail_top_gap"
- android:background="?attr/call_detail_transparent_background"
>
+ <LinearLayout
+ android:id="@+id/action_bar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/call_detail_action_bar_height"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:orientation="horizontal"
+ android:background="@drawable/call_log_action_bar_bg"
+ >
+ <ImageView
+ android:id="@+id/action_bar_home"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:src="@drawable/ic_call_log_home"
+ />
+ </LinearLayout>
<ImageView
android:id="@+id/contact_background"
android:layout_width="match_parent"
android:layout_height="?attr/call_detail_contact_background_height"
android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
+ android:layout_below="@id/action_bar"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:background="@drawable/ic_contact_picture"
/>
- <View
- android:id="@+id/contact_background_overlay"
+ <ListView
+ android:id="@android:id/list"
android:layout_width="match_parent"
- android:layout_height="?attr/call_detail_contact_background_height"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/contact_background"
android:background="?attr/call_detail_primary_background_color"
- android:alpha="?attr/call_detail_contact_background_overlay_alpha"
/>
-
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="?attr/call_detail_contact_background_overlay_height"
+ android:background="#3F000000"
+ android:layout_alignParentLeft="true"
+ android:layout_above="@android:id/list"
+ />
<RelativeLayout
android:id="@+id/photo_panel"
android:layout_width="match_parent"
- android:layout_height="?attr/call_detail_contact_background_height"
+ android:layout_height="?attr/call_detail_contact_background_overlay_height"
android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:paddingBottom="10dp"
+ android:layout_above="@android:id/list"
+ android:paddingLeft="5dip"
>
- <ImageView
- android:id="@+id/contact_photo"
- android:layout_width="?attr/call_detail_contact_photo_size"
- android:layout_height="?attr/call_detail_contact_photo_size"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
-
- android:background="@drawable/ic_contact_picture"
- />
<RelativeLayout
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
- android:layout_toRightOf="@id/contact_photo"
- android:layout_marginLeft="10dp"
>
<include layout="@layout/call_log_phone_call_details" />
</RelativeLayout>
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="?attr/call_detail_action_icon_size"
+ <ImageView
+ android:id="@+id/main_action"
+ android:layout_width="?attr/call_detail_action_icon_size"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:scaleType="center"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
- android:layout_marginBottom="10dp"
- >
- <ImageView
- android:id="@+id/call"
- android:layout_width="?attr/call_detail_action_icon_size"
- android:layout_height="?attr/call_detail_action_icon_size"
- android:layout_alignParentRight="true"
- android:gravity="center_vertical"
- android:src="@drawable/ic_call_log_list_action_call"
- android:scaleType="center"
- />
- <View
- android:id="@+id/divider"
- android:layout_width="1px"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dip"
- android:layout_marginBottom="5dip"
- android:layout_toLeftOf="@id/call"
- android:layout_marginLeft="11dip"
- android:background="#FFFFFF"
- />
- </RelativeLayout>
+ />
</RelativeLayout>
<RelativeLayout
android:id="@+id/call_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
- android:layout_below="@id/photo_panel"
+ android:layout_below="@android:id/list"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:paddingLeft="80dp"
- android:background="#FFFFFF"
+ android:background="?attr/call_detail_secondary_background_color"
>
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
+ android:textColor="?attr/call_detail_secondary_text_color"
/>
<TextView
android:id="@+id/duration"
@@ -121,6 +112,7 @@
android:layout_alignParentLeft="true"
android:layout_below="@id/time"
android:layout_alignLeft="@id/time"
+ android:textColor="?attr/call_detail_secondary_text_color"
/>
<ImageView
android:id="@+id/delete"
@@ -133,11 +125,4 @@
android:visibility="gone"
/>
</RelativeLayout>
- <ListView
- android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/call_panel"
- android:background="?attr/call_detail_secondary_background_color"
- />
</RelativeLayout>
diff --git a/res/layout/call_log_phone_call_details.xml b/res/layout/call_log_phone_call_details.xml
index 71fd63e..5da2773 100644
--- a/res/layout/call_log_phone_call_details.xml
+++ b/res/layout/call_log_phone_call_details.xml
@@ -15,8 +15,8 @@
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <TextView
- android:id="@+id/number"
+ <LinearLayout
+ android:id="@+id/call_types"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
@@ -25,13 +25,23 @@
android:layout_alignParentBottom="true"
/>
<TextView
- android:id="@+id/call_type"
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?attr/call_detail_primary_text_color"
+ android:layout_toRightOf="@id/call_types"
+ android:layout_marginLeft="?attr/call_detail_date_margin"
+ android:layout_alignParentBottom="true"
+ />
+ <TextView
+ android:id="@+id/number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?attr/call_detail_primary_text_color"
android:layout_alignParentLeft="true"
- android:layout_above="@id/number"
+ android:layout_above="@id/call_types"
/>
<TextView
android:id="@+id/name"
@@ -40,7 +50,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?attr/call_detail_primary_text_color"
android:layout_alignParentLeft="true"
- android:layout_above="@id/call_type"
+ android:layout_above="@id/number"
android:paddingBottom="2dp"
/>
</merge>
diff --git a/res/layout/contact_detail_container.xml b/res/layout/contact_detail_container.xml
new file mode 100644
index 0000000..0b5b85a
--- /dev/null
+++ b/res/layout/contact_detail_container.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ Layout for the contact card page. If the contact has social updates, then
+ the ViewPager and ContactDetailTabCarousel are shown together. If there
+ aren't any social updates, then just the ContactDetailFragment will be
+ shown. We include all 3 views even though they are never shown
+ simultaneously because this layout is reused but set with different data
+ each time (i.e. on a tablet).
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <android.support.v4.view.ViewPager
+ android:id="@+id/pager"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:paddingTop="20dip"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <include
+ android:id="@+id/tab_carousel"
+ layout="@layout/contact_detail_tab_carousel"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="20dip"
+ android:paddingLeft="10dip"
+ android:paddingRight="10dip"/>
+
+ <fragment
+ android:id="@+id/contact_detail_fragment"
+ class="com.android.contacts.detail.ContactDetailFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml
index 4533f9d..e9a95ee 100644
--- a/res/layout/dialpad.xml
+++ b/res/layout/dialpad.xml
@@ -21,12 +21,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:layout_marginTop="10dip"
+ android:layout_marginTop="4dip"
+ android:background="@drawable/dialpad_background"
android:layout_weight="1">
<TableRow>
<ImageButton android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_1_no_vm"
+ android:src="@drawable/dial_num_1"
android:contentDescription="@string/description_image_button_one" />
<ImageButton android:id="@+id/two" style="@style/DialtactsDialpadButtonStyle"
android:src="@drawable/dial_num_2"
diff --git a/res/layout/dialpad_additional_buttons.xml b/res/layout/dialpad_additional_buttons.xml
index 8831dad..47a578e 100644
--- a/res/layout/dialpad_additional_buttons.xml
+++ b/res/layout/dialpad_additional_buttons.xml
@@ -20,8 +20,10 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dialpad_additional_buttons_height"
android:layout_gravity="center_horizontal"
- android:layout_marginBottom="8dip"
+ android:layout_marginTop="4dip"
+ android:layout_marginBottom="4dip"
android:layout_weight="0.25"
+ android:background="@drawable/dialpad_background"
android:orientation="horizontal">
<!-- Onscreen "Search button -->
@@ -31,7 +33,7 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
- android:background="@null"
+ android:background="@drawable/btn_dial"
android:contentDescription="@string/description_search_button"
android:src="@drawable/ic_dial_action_search"/>
@@ -44,7 +46,7 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
- android:background="@null"
+ android:background="@drawable/btn_call"
android:contentDescription="@string/description_dial_button"
android:src="@drawable/ic_dial_action_call" />
@@ -55,7 +57,7 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
- android:background="@null"
+ android:background="@drawable/btn_dial"
android:contentDescription="@string/description_delete_button"
android:src="@drawable/ic_dial_action_delete" />
</LinearLayout>
diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml
index b91c27a..aee2c25 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -19,8 +19,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:background="@android:color/black"
->
+ android:layout_marginLeft="8dip"
+ android:layout_marginRight="8dip" >
<!-- Text field above the keypad where the digits are displayed.
It's type is set to NULL (to disable the IME keyboard) in the
@@ -31,15 +31,16 @@
<EditText android:id="@+id/digits"
android:layout_width="match_parent"
android:layout_height="@dimen/dialpad_digits_height"
- android:layout_marginTop="10dip"
+ android:layout_marginTop="4dip"
android:gravity="center"
android:textAppearance="@style/DialtactsDigitsTextAppearance"
- android:textColor="?android:attr/textColorPrimaryInverse" />
+ android:background="@drawable/dialpad_background"
+ android:textColor="?android:attr/textColorPrimary" />
<!-- Keypad section -->
<include layout="@layout/dialpad" />
- <!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
+ <!-- Horizontal row of buttons (Search + DialButton + Delete.) -->
<include layout="@layout/dialpad_additional_buttons" />
<!-- "Dialpad chooser" UI, shown only when the user brings up the
diff --git a/res/mipmap-hdpi/ic_launcher_contacts.png b/res/mipmap-hdpi/ic_launcher_contacts.png
index e935f52..d730319 100644
--- a/res/mipmap-hdpi/ic_launcher_contacts.png
+++ b/res/mipmap-hdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_phone.png b/res/mipmap-hdpi/ic_launcher_phone.png
index 7739546..0943ce5 100644
--- a/res/mipmap-hdpi/ic_launcher_phone.png
+++ b/res/mipmap-hdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_contacts.png b/res/mipmap-mdpi/ic_launcher_contacts.png
index 155ba5a..c79ae14 100644
--- a/res/mipmap-mdpi/ic_launcher_contacts.png
+++ b/res/mipmap-mdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_phone.png b/res/mipmap-mdpi/ic_launcher_phone.png
index aa4f3c5..724f94a 100644
--- a/res/mipmap-mdpi/ic_launcher_phone.png
+++ b/res/mipmap-mdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_contacts.png b/res/mipmap-xhdpi/ic_launcher_contacts.png
new file mode 100644
index 0000000..ca3aa63
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts.png b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts.png
new file mode 100644
index 0000000..99bb9f8
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_phone.png b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_phone.png
new file mode 100644
index 0000000..fd416b8
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_phone.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_starred.png b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_starred.png
new file mode 100644
index 0000000..ff9e326
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_starred.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_phone.png b/res/mipmap-xhdpi/ic_launcher_phone.png
new file mode 100644
index 0000000..6a454da
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png b/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png
new file mode 100644
index 0000000..94c7da5
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png b/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png
new file mode 100644
index 0000000..42f8f0a
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png b/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png
new file mode 100644
index 0000000..babcc02
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/values-sw580dp-w1000dp/dimens.xml b/res/values-sw580dp-w1000dp/dimens.xml
index 45da0a8..dfa1b81 100644
--- a/res/values-sw580dp-w1000dp/dimens.xml
+++ b/res/values-sw580dp-w1000dp/dimens.xml
@@ -21,4 +21,5 @@
<dimen name="action_bar_search_spacing">32dip</dimen>
<dimen name="detail_header_view_margin">16dip</dimen>
<dimen name="detail_header_attribution_height">56dip</dimen>
+ <dimen name="detail_tab_carousel_height">0dip</dimen>
</resources>
diff --git a/res/values/config.xml b/res/values-sw580dp-w1000dp/integers.xml
similarity index 71%
copy from res/values/config.xml
copy to res/values-sw580dp-w1000dp/integers.xml
index 6ebaa1f..5fda2ed 100644
--- a/res/values/config.xml
+++ b/res/values-sw580dp-w1000dp/integers.xml
@@ -13,12 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
-</resources>
+ <integer name="contact_tile_column_count">4</integer>
+</resources>
\ No newline at end of file
diff --git a/res/values/config.xml b/res/values-sw580dp-w720dp/integers.xml
similarity index 71%
copy from res/values/config.xml
copy to res/values-sw580dp-w720dp/integers.xml
index 6ebaa1f..c629f7e 100644
--- a/res/values/config.xml
+++ b/res/values-sw580dp-w720dp/integers.xml
@@ -13,12 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
+ <integer name="contact_tile_column_count">2</integer>
</resources>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index f1e5736..0c1e5fb 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -32,5 +32,5 @@
<dimen name="shortcut_icon_size">64dip</dimen>
<dimen name="list_section_height">37dip</dimen>
<dimen name="directory_header_height">56dip</dimen>
- <dimen name="detail_tab_carousel_height">150dip</dimen>
+ <dimen name="detail_tab_carousel_height">256dip</dimen>
</resources>
diff --git a/res/values/config.xml b/res/values-sw580dp/integers.xml
similarity index 71%
copy from res/values/config.xml
copy to res/values-sw580dp/integers.xml
index 6ebaa1f..c629f7e 100644
--- a/res/values/config.xml
+++ b/res/values-sw580dp/integers.xml
@@ -13,12 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
+ <integer name="contact_tile_column_count">2</integer>
</resources>
diff --git a/res/values/config.xml b/res/values-w470dp/integers.xml
similarity index 71%
copy from res/values/config.xml
copy to res/values-w470dp/integers.xml
index 6ebaa1f..d247e46 100644
--- a/res/values/config.xml
+++ b/res/values-w470dp/integers.xml
@@ -13,12 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<resources>
-
- <!-- Amount of memory in bytes allocated for photo cache -->
- <integer name="config_photo_cache_max_bytes">2000000</integer>
-
- <!-- Number of decoded photo bitmaps retained in an LRU cache -->
- <integer name="config_photo_cache_max_bitmaps">48</integer>
+ <integer name="contact_tile_column_count">4</integer>
</resources>
diff --git a/res/values/config.xml b/res/values/integers.xml
similarity index 88%
rename from res/values/config.xml
rename to res/values/integers.xml
index 6ebaa1f..1d3f9b9 100644
--- a/res/values/config.xml
+++ b/res/values/integers.xml
@@ -15,10 +15,12 @@
-->
<resources>
-
<!-- Amount of memory in bytes allocated for photo cache -->
<integer name="config_photo_cache_max_bytes">2000000</integer>
<!-- Number of decoded photo bitmaps retained in an LRU cache -->
<integer name="config_photo_cache_max_bitmaps">48</integer>
+
+ <!-- Determines the number of columns in a ContactTileRow -->
+ <integer name="contact_tile_column_count">2</integer>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2add5e2..6e88440 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -691,6 +691,7 @@
<!-- String describing the Search ImageButton
Used by AccessibilityService to announce the purpose of the button.
+ [CHAR LIMIT=NONE]
-->
<string name="description_search_button">search</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 801cc51..067a730 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
<resources>
- <style name="DialtactsTheme" parent="android:Theme.Holo.Light.SplitActionBarWhenNarrow">
+ <style name="DialtactsTheme" parent="android:Theme.Holo.SplitActionBarWhenNarrow">
<item name="android:windowContentOverlay">@null</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="section_header_background">@drawable/list_title_holo</item>
@@ -33,7 +33,7 @@
<item name="list_item_profile_photo_size">70dip</item>
<item name="list_item_prefix_highlight_color">#729a27</item>
<item name="list_item_header_text_indent">56dip</item>
- <item name="list_item_header_text_color">?color/section_header_text_color</item>
+ <item name="list_item_header_text_color">#ffcccccc</item>
<item name="list_item_header_text_size">14sp</item>
<item name="contact_filter_popup_width">320dip</item>
<!-- CallLogActivity -->
@@ -42,21 +42,20 @@
<item name="call_log_list_item_height">60dip</item>
</style>
- <style name="CallDetailActivityTheme" parent="android:Theme.Holo.Light">
- <item name="android:windowContentOverlay">@null</item>
- <item name="android:windowIsTranslucent">true</item>
+ <style name="CallDetailActivityTheme" parent="android:Theme.Holo">
<item name="android:windowNoTitle">true</item>
- <item name="android:windowBackground">@android:color/transparent</item>
<item name="android:gravity">top</item>
- <item name="call_detail_top_gap">49dip</item>
<item name="call_detail_transparent_background">#CC000000</item>
<item name="call_detail_contact_background_height">150dip</item>
+ <item name="call_detail_contact_background_overlay_height">70dip</item>
+ <item name="call_detail_action_bar_height">60dip</item>
+ <item name="call_detail_action_icon_size">60dip</item>
<item name="call_detail_contact_background_overlay_alpha">0.25</item>
- <item name="call_detail_primary_background_color">#000000</item>
- <item name="call_detail_contact_photo_size">60dip</item>
<item name="call_detail_primary_text_color">#FFFFFF</item>
- <item name="call_detail_action_icon_size">50dip</item>
- <item name="call_detail_secondary_background_color">#FFFFFF</item>
+ <item name="call_detail_date_margin">5dip</item>
+ <item name="call_detail_primary_background_color">#000000</item>
+ <item name="call_detail_secondary_text_color">#FFFFFF</item>
+ <item name="call_detail_secondary_background_color">#333333</item>
</style>
<style name="ContactDetailActivityTheme" parent="android:Theme.Holo.Light">
@@ -132,15 +131,18 @@
</declare-styleable>
<declare-styleable name="CallDetailActivity">
- <attr name="call_detail_top_gap" format="dimension" />
<attr name="call_detail_transparent_background" format="color" />
<attr name="call_detail_contact_background_height" format="dimension" />
+ <attr name="call_detail_contact_background_overlay_height" format="dimension" />
<attr name="call_detail_contact_background_overlay_alpha" format="float" />
<attr name="call_detail_contact_photo_size" format="dimension" />
<attr name="call_detail_action_icon_size" format="dimension" />
+ <attr name="call_detail_action_bar_height" format="dimension" />
<attr name="call_detail_primary_text_color" format="color" />
<attr name="call_detail_primary_background_color" format="color" />
+ <attr name="call_detail_secondary_text_color" format="color" />
<attr name="call_detail_secondary_background_color" format="color" />
+ <attr name="call_detail_date_margin" format="dimension" />
</declare-styleable>
<declare-styleable name="CallLogActivity">
@@ -313,7 +315,7 @@
<item name="android:layout_width">0dip</item>
<item name="android:layout_height">@dimen/dialpad_button_height</item>
<item name="android:layout_weight">1</item>
- <item name="android:background">@null</item>
+ <item name="android:background">@drawable/btn_dial</item>
<item name="android:soundEffectsEnabled">false</item>
</style>
</resources>
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index 43376ca..a4a578f 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -61,8 +61,8 @@
private PhoneCallDetailsHelper mPhoneCallDetailsHelper;
private TextView mCallTimeView;
private TextView mCallDurationView;
- private View mCallActionView;
- private ImageView mContactPhotoView;
+ private View mHomeActionView;
+ private ImageView mMainActionView;
private ImageView mContactBackgroundView;
private String mNumber = null;
@@ -115,15 +115,28 @@
mResources = getResources();
mPhoneCallDetailsViews = PhoneCallDetailsViews.fromView(getWindow().getDecorView());
- mPhoneCallDetailsHelper = new PhoneCallDetailsHelper(getResources(), getVoicemailNumber());
- mCallActionView = findViewById(R.id.call);
- mContactPhotoView = (ImageView) findViewById(R.id.contact_photo);
+ mPhoneCallDetailsHelper = new PhoneCallDetailsHelper(this, getResources(),
+ getVoicemailNumber(),
+ getResources().getDrawable(R.drawable.ic_call_log_list_incoming_call),
+ getResources().getDrawable(R.drawable.ic_call_log_list_outgoing_call),
+ getResources().getDrawable(R.drawable.ic_call_log_list_missed_call),
+ getResources().getDrawable(R.drawable.ic_call_log_list_voicemail));
+ mHomeActionView = findViewById(R.id.action_bar_home);
+ mMainActionView = (ImageView) findViewById(R.id.main_action);
mContactBackgroundView = (ImageView) findViewById(R.id.contact_background);
mCallTimeView = (TextView) findViewById(R.id.time);
mCallDurationView = (TextView) findViewById(R.id.duration);
mDefaultCountryIso = ContactsUtils.getCurrentCountryIso(this);
mContactPhotoManager = ContactPhotoManager.getInstance(this);
getListView().setOnItemClickListener(this);
+ mHomeActionView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // We want this to start the call log if this activity was not started from the
+ // call log itself.
+ CallDetailActivity.this.finish();
+ }
+ });
}
@Override
@@ -193,7 +206,7 @@
mNumber.equals(CallerInfo.PRIVATE_NUMBER)) {
numberText = getString(mNumber.equals(CallerInfo.PRIVATE_NUMBER)
? R.string.private_num : R.string.unknown);
- mCallActionView.setVisibility(View.GONE);
+ mMainActionView.setVisibility(View.GONE);
} else {
// Perform a reverse-phonebook lookup to find the PERSON_ID
Uri personUri = null;
@@ -222,38 +235,42 @@
}
numberText = mNumber;
- mCallActionView.setVisibility(View.VISIBLE);
- mCallActionView.setOnClickListener(new View.OnClickListener() {
+ // Let user view contact details if they exist, otherwise add option
+ // to create new contact from this number.
+ final Intent mainActionIntent;
+ final int mainActionIcon;
+ if (personUri != null) {
+ mainActionIntent = new Intent(Intent.ACTION_VIEW, personUri);
+ mainActionIcon = R.drawable.sym_action_view_contact;
+ } else {
+ mainActionIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
+ mainActionIntent.setType(Contacts.CONTENT_ITEM_TYPE);
+ mainActionIntent.putExtra(Insert.PHONE, mNumber);
+ mainActionIcon = R.drawable.sym_action_add;
+ }
+
+ mMainActionView.setVisibility(View.VISIBLE);
+ mMainActionView.setImageResource(mainActionIcon);
+ mMainActionView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- Intent callIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
- Uri.fromParts("tel", mNumber, null));
- startActivity(callIntent);
+ startActivity(mainActionIntent);
}
});
// Build list of various available actions
List<ViewEntry> actions = new ArrayList<ViewEntry>();
+ Intent callIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+ Uri.fromParts("tel", mNumber, null));
+ actions.add(new ViewEntry(android.R.drawable.sym_action_call,
+ getString(R.string.menu_callNumber, mNumber), callIntent));
+
Intent smsIntent = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("sms", mNumber, null));
actions.add(new ViewEntry(R.drawable.sym_action_sms,
getString(R.string.menu_sendTextMessage), smsIntent));
- // Let user view contact details if they exist, otherwise add option
- // to create new contact from this number.
- if (personUri != null) {
- Intent viewIntent = new Intent(Intent.ACTION_VIEW, personUri);
- actions.add(new ViewEntry(R.drawable.sym_action_view_contact,
- getString(R.string.menu_viewContact), viewIntent));
- } else {
- Intent createIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
- createIntent.setType(Contacts.CONTENT_ITEM_TYPE);
- createIntent.putExtra(Insert.PHONE, mNumber);
- actions.add(new ViewEntry(R.drawable.sym_action_add,
- getString(R.string.recentCalls_addToContact), createIntent));
- }
-
ViewAdapter adapter = new ViewAdapter(this, actions);
setListAdapter(adapter);
}
@@ -277,21 +294,7 @@
/** Load the contact photos and places them in the corresponding views. */
private void loadContactPhotos(final long photoId) {
- // There seem to be a limitation in the ContactPhotoManager that does not allow requesting
- // two photos at once.
- // TODO: Figure out the problem with ContactPhotoManager and remove this nonsense.
- mContactPhotoView.post(new Runnable() {
- @Override
- public void run() {
- mContactPhotoManager.loadPhoto(mContactPhotoView, photoId);
- mContactPhotoView.postDelayed(new Runnable() {
- @Override
- public void run() {
- mContactPhotoManager.loadPhoto(mContactBackgroundView, photoId);
- }
- }, 100);
- }
- });
+ mContactPhotoManager.loadPhoto(mContactBackgroundView, photoId);
}
private String formatDuration(long elapsedSeconds) {
diff --git a/src/com/android/contacts/PhoneCallDetailsHelper.java b/src/com/android/contacts/PhoneCallDetailsHelper.java
index fc96a89..78ca252 100644
--- a/src/com/android/contacts/PhoneCallDetailsHelper.java
+++ b/src/com/android/contacts/PhoneCallDetailsHelper.java
@@ -19,8 +19,10 @@
import com.android.contacts.format.FormatUtils;
import com.android.internal.telephony.CallerInfo;
+import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.telephony.PhoneNumberUtils;
@@ -28,16 +30,25 @@
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.view.View;
+import android.widget.ImageView;
/**
* Helper class to fill in the views in {@link PhoneCallDetailsViews}.
*/
public class PhoneCallDetailsHelper {
+ private final Context mContext;
private final Resources mResources;
private final String mVoicemailNumber;
- private final String mTypeIncomingText;
- private final String mTypeOutgoingText;
- private final String mTypeMissedText;
+ /** Icon for incoming calls. */
+ private final Drawable mIncomingDrawable;
+ /** Icon for outgoing calls. */
+ private final Drawable mOutgoingDrawable;
+ /** Icon for missed calls. */
+ private final Drawable mMissedDrawable;
+ /** Icon for voicemails. */
+ private final Drawable mVoicemailDrawable;
+ /** The injected current time in milliseconds since the epoch. Used only by tests. */
+ private Long mCurrentTimeMillisForTest;
/**
* Creates a new instance of the helper.
@@ -46,12 +57,16 @@
*
* @param resources used to look up strings
*/
- public PhoneCallDetailsHelper(Resources resources, String voicemailNumber) {
+ public PhoneCallDetailsHelper(Context context, Resources resources, String voicemailNumber,
+ Drawable incomingDrawable, Drawable outgoingDrawable, Drawable missedDrawable,
+ Drawable voicemailDrawable) {
+ mContext = context;
mResources = resources;
mVoicemailNumber = voicemailNumber;
- mTypeIncomingText = mResources.getString(R.string.type_incoming);
- mTypeOutgoingText = mResources.getString(R.string.type_outgoing);
- mTypeMissedText = mResources.getString(R.string.type_missed);
+ mIncomingDrawable = incomingDrawable;
+ mOutgoingDrawable = outgoingDrawable;
+ mMissedDrawable = missedDrawable;
+ mVoicemailDrawable = voicemailDrawable;
}
/**
@@ -67,31 +82,30 @@
public void setPhoneCallDetails(PhoneCallDetailsViews views, long date,
int callType, CharSequence name, CharSequence number, int numberType,
CharSequence numberLabel) {
- CharSequence callTypeText = "";
+ Drawable callTypeDrawable = null;
switch (callType) {
case Calls.INCOMING_TYPE:
- callTypeText = mTypeIncomingText;
+ callTypeDrawable = mIncomingDrawable;
break;
case Calls.OUTGOING_TYPE:
- callTypeText = mTypeOutgoingText;
+ callTypeDrawable = mOutgoingDrawable;
break;
case Calls.MISSED_TYPE:
- callTypeText = mTypeMissedText;
+ callTypeDrawable = mMissedDrawable;
+ break;
+
+ case Calls.VOICEMAIL_TYPE:
+ callTypeDrawable = mVoicemailDrawable;
break;
}
-
CharSequence shortDateText =
DateUtils.getRelativeTimeSpanString(date,
- System.currentTimeMillis(),
+ getCurrentTimeMillis(),
DateUtils.MINUTE_IN_MILLIS,
DateUtils.FORMAT_ABBREV_RELATIVE);
- CharSequence callTypeAndDateText = FormatUtils.applyStyleToSpan(Typeface.BOLD,
- callTypeText + " " + shortDateText, 0, callTypeText.length(),
- Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
-
CharSequence numberFormattedLabel = null;
// Only show a label if the number is shown and it is not a SIP address.
if (!TextUtils.isEmpty(number) && !PhoneNumberUtils.isUriNumber(number.toString())) {
@@ -114,17 +128,22 @@
}
}
- views.mCallTypeAndDateView.setText(callTypeAndDateText);
- views.mCallTypeAndDateView.setVisibility(View.VISIBLE);
- views.mNameView.setText(nameText);
- views.mNameView.setVisibility(View.VISIBLE);
+ ImageView callTypeImage = new ImageView(mContext);
+ callTypeImage.setImageDrawable(callTypeDrawable);
+ views.callTypesLayout.removeAllViews();
+ views.callTypesLayout.addView(callTypeImage);
+
+ views.dateView.setText(shortDateText);
+ views.dateView.setVisibility(View.VISIBLE);
+ views.nameView.setText(nameText);
+ views.nameView.setVisibility(View.VISIBLE);
// Do not show the number if it is not available. This happens if we have only the number,
// in which case the number is shown in the name field instead.
if (!TextUtils.isEmpty(numberText)) {
- views.mNumberView.setText(numberText);
- views.mNumberView.setVisibility(View.VISIBLE);
+ views.numberView.setText(numberText);
+ views.numberView.setVisibility(View.VISIBLE);
} else {
- views.mNumberView.setVisibility(View.GONE);
+ views.numberView.setVisibility(View.GONE);
}
}
@@ -146,4 +165,21 @@
}
return number;
}
+
+ public void setCurrentTimeForTest(long currentTimeMillis) {
+ mCurrentTimeMillisForTest = currentTimeMillis;
+ }
+
+ /**
+ * Returns the current time in milliseconds since the epoch.
+ * <p>
+ * It can be injected in tests using {@link #setCurrentTimeForTest(long)}.
+ */
+ private long getCurrentTimeMillis() {
+ if (mCurrentTimeMillisForTest == null) {
+ return System.currentTimeMillis();
+ } else {
+ return mCurrentTimeMillisForTest;
+ }
+ }
}
diff --git a/src/com/android/contacts/PhoneCallDetailsViews.java b/src/com/android/contacts/PhoneCallDetailsViews.java
index c2819c3..483ec65 100644
--- a/src/com/android/contacts/PhoneCallDetailsViews.java
+++ b/src/com/android/contacts/PhoneCallDetailsViews.java
@@ -17,37 +17,42 @@
package com.android.contacts;
import android.view.View;
+import android.widget.LinearLayout;
import android.widget.TextView;
/**
* Encapsulates the views that are used to display the details of a phone call in the call log.
*/
public final class PhoneCallDetailsViews {
- public final TextView mNameView;
- public final TextView mCallTypeAndDateView;
- public final TextView mNumberView;
+ public final TextView nameView;
+ public final LinearLayout callTypesLayout;
+ public final TextView dateView;
+ public final TextView numberView;
- private PhoneCallDetailsViews(TextView nameView, TextView callTypeAndDateView,
- TextView numberView) {
- mNameView = nameView;
- mCallTypeAndDateView = callTypeAndDateView;
- mNumberView = numberView;
+ private PhoneCallDetailsViews(TextView nameView, LinearLayout callTypesLayout,
+ TextView dateView, TextView numberView) {
+ this.nameView = nameView;
+ this.callTypesLayout = callTypesLayout;
+ this.dateView = dateView;
+ this.numberView = numberView;
}
/**
* Create a new instance by extracting the elements from the given view.
* <p>
* The view should contain three text views with identifiers {@code R.id.name},
- * {@code R.id.call_type}, and {@code R.id.number}.
+ * {@code R.id.date}, and {@code R.id.number}, and a linear layout with identifier
+ * {@code R.id.call_types}.
*/
public static PhoneCallDetailsViews fromView(View view) {
return new PhoneCallDetailsViews((TextView) view.findViewById(R.id.name),
- (TextView) view.findViewById(R.id.call_type),
+ (LinearLayout) view.findViewById(R.id.call_types),
+ (TextView) view.findViewById(R.id.date),
(TextView) view.findViewById(R.id.number));
}
public static PhoneCallDetailsViews createForTest(TextView nameView,
- TextView callTypeAndDateView, TextView numberView) {
- return new PhoneCallDetailsViews(nameView, callTypeAndDateView, numberView);
+ LinearLayout callTypesLayout, TextView dateView, TextView numberView) {
+ return new PhoneCallDetailsViews(nameView, callTypesLayout, dateView, numberView);
}
}
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index 30e445e..073f665 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -49,6 +49,7 @@
private static final String EXTRA_KEY_SEARCH_MODE = "navBar.searchMode";
private static final String EXTRA_KEY_QUERY = "navBar.query";
+ private static final String EXTRA_KEY_SELECTED_TAB = "navBar.selectedTab";
private boolean mSearchMode;
private String mQueryString;
@@ -213,11 +214,13 @@
public void onSaveInstanceState(Bundle outState) {
outState.putBoolean(EXTRA_KEY_SEARCH_MODE, mSearchMode);
outState.putString(EXTRA_KEY_QUERY, mQueryString);
+ outState.putInt(EXTRA_KEY_SELECTED_TAB, mActionBar.getSelectedNavigationIndex());
}
public void onRestoreInstanceState(Bundle savedState) {
mSearchMode = savedState.getBoolean(EXTRA_KEY_SEARCH_MODE);
mQueryString = savedState.getString(EXTRA_KEY_QUERY);
+ mActionBar.setSelectedNavigationItem(savedState.getInt(EXTRA_KEY_SELECTED_TAB));
}
@Override
diff --git a/src/com/android/contacts/activities/ContactDetailActivity.java b/src/com/android/contacts/activities/ContactDetailActivity.java
index b45ba39..800bfb1 100644
--- a/src/com/android/contacts/activities/ContactDetailActivity.java
+++ b/src/com/android/contacts/activities/ContactDetailActivity.java
@@ -62,6 +62,7 @@
import java.util.ArrayList;
+// TODO: Use {@link ContactDetailLayoutController} so there isn't duplicated code
public class ContactDetailActivity extends ContactsActivity {
private static final String TAG = "ContactDetailActivity";
@@ -216,19 +217,24 @@
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
+ // First check if the {@link ContactLoaderFragment} can handle the key
+ if (mLoaderFragment.handleKeyDown(keyCode)) return true;
+
+ // Otherwise find the correct fragment to handle the event
FragmentKeyListener mCurrentFragment;
switch (getCurrentPage()) {
case 0:
- mCurrentFragment = (FragmentKeyListener) mDetailFragment;
+ mCurrentFragment = mDetailFragment;
break;
case 1:
- mCurrentFragment = (FragmentKeyListener) mUpdatesFragment;
+ mCurrentFragment = mUpdatesFragment;
break;
default:
throw new IllegalStateException("Invalid current item for ViewPager");
}
if (mCurrentFragment.handleKeyDown(keyCode)) return true;
+ // In the last case, give the key event to the superclass.
return super.onKeyDown(keyCode, event);
}
@@ -260,6 +266,11 @@
private final ContactLoaderFragmentListener mLoaderFragmentListener =
new ContactLoaderFragmentListener() {
@Override
+ public void onContactNotFound() {
+ finish();
+ }
+
+ @Override
public void onDetailsLoaded(final ContactLoader.Result result) {
if (result == null) {
return;
@@ -283,6 +294,16 @@
}
});
}
+
+ @Override
+ public void onEditRequested(Uri contactLookupUri) {
+ startActivity(new Intent(Intent.ACTION_EDIT, contactLookupUri));
+ }
+
+ @Override
+ public void onDeleteRequested(Uri contactUri) {
+ ContactDeletionInteraction.start(ContactDetailActivity.this, contactUri, true);
+ }
};
/**
@@ -337,16 +358,6 @@
private final ContactDetailFragment.Listener mFragmentListener =
new ContactDetailFragment.Listener() {
@Override
- public void onContactNotFound() {
- finish();
- }
-
- @Override
- public void onEditRequested(Uri contactLookupUri) {
- startActivity(new Intent(Intent.ACTION_EDIT, contactLookupUri));
- }
-
- @Override
public void onItemClicked(Intent intent) {
try {
startActivity(intent);
@@ -356,11 +367,6 @@
}
@Override
- public void onDeleteRequested(Uri contactUri) {
- ContactDeletionInteraction.start(ContactDetailActivity.this, contactUri, true);
- }
-
- @Override
public void onCreateRawContactRequested(
ArrayList<ContentValues> values, Account account) {
Toast.makeText(ContactDetailActivity.this, R.string.toast_making_personal_copy,
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index d6661db..d5bdd61 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -21,6 +21,11 @@
import com.android.contacts.ContactsActivity;
import com.android.contacts.R;
import com.android.contacts.detail.ContactDetailFragment;
+import com.android.contacts.detail.ContactDetailLayoutController;
+import com.android.contacts.detail.ContactDetailTabCarousel;
+import com.android.contacts.detail.ContactDetailUpdatesFragment;
+import com.android.contacts.detail.ContactLoaderFragment;
+import com.android.contacts.detail.ContactLoaderFragment.ContactLoaderFragmentListener;
import com.android.contacts.group.GroupBrowseListFragment;
import com.android.contacts.group.GroupBrowseListFragment.OnGroupBrowserActionListener;
import com.android.contacts.group.GroupDetailFragment;
@@ -65,11 +70,13 @@
import android.content.res.TypedArray;
import android.net.Uri;
import android.os.Bundle;
+import android.os.Handler;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents;
import android.provider.ContactsContract.ProviderStatus;
import android.provider.Settings;
+import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
@@ -103,8 +110,6 @@
private static final int SUBACTIVITY_EDIT_GROUP = 5;
private static final int SUBACTIVITY_CUSTOMIZE_FILTER = 6;
- private static final int FAVORITES_COLUMN_COUNT = 4;
-
private static final String KEY_SEARCH_MODE = "searchMode";
private DialogManager mDialogManager = new DialogManager(this);
@@ -125,12 +130,17 @@
private boolean mContentPaneDisplayed;
private ContactDetailFragment mContactDetailFragment;
+ private ContactDetailUpdatesFragment mContactDetailUpdatesFragment;
private final ContactDetailFragmentListener mContactDetailFragmentListener =
new ContactDetailFragmentListener();
- private final GroupDetailFragmentListener mGroupDetailFragmentListener =
- new GroupDetailFragmentListener();
+
+ private ContactLoaderFragment mContactDetailLoaderFragment;
+ private final ContactDetailLoaderFragmentListener mContactDetailLoaderFragmentListener =
+ new ContactDetailLoaderFragmentListener();
private GroupDetailFragment mGroupDetailFragment;
+ private final GroupDetailFragmentListener mGroupDetailFragmentListener =
+ new GroupDetailFragmentListener();
private StrequentContactListFragment.Listener mFavoritesFragmentListener =
new StrequentContactListFragmentListener();
@@ -156,6 +166,10 @@
private View mAddGroupImageView;
+ private ContactDetailLayoutController mContactDetailLayoutController;
+
+ private Handler mHandler = new Handler();
+
private enum TabState {
FAVORITES, CONTACTS, GROUPS
}
@@ -191,11 +205,17 @@
mContactDetailFragment = (ContactDetailFragment) fragment;
mContactDetailFragment.setListener(mContactDetailFragmentListener);
mContentPaneDisplayed = true;
+ } else if (fragment instanceof ContactDetailUpdatesFragment) {
+ mContactDetailUpdatesFragment = (ContactDetailUpdatesFragment) fragment;
} else if (fragment instanceof ContactsUnavailableFragment) {
mContactsUnavailableFragment = (ContactsUnavailableFragment)fragment;
mContactsUnavailableFragment.setProviderStatusLoader(mProviderStatusLoader);
mContactsUnavailableFragment.setOnContactsUnavailableActionListener(
new ContactsUnavailableFragmentListener());
+ } else if (fragment instanceof ContactLoaderFragment) {
+ mContactDetailLoaderFragment = (ContactLoaderFragment) fragment;
+ mContactDetailLoaderFragment.setListener(mContactDetailLoaderFragmentListener);
+ mContentPaneDisplayed = true;
} else if (fragment instanceof GroupDetailFragment) {
mGroupDetailFragment = (GroupDetailFragment) fragment;
mGroupDetailFragment.setListener(mGroupDetailFragmentListener);
@@ -203,7 +223,6 @@
} else if (fragment instanceof StrequentContactListFragment) {
mFavoritesFragment = (StrequentContactListFragment) fragment;
mFavoritesFragment.setListener(mFavoritesFragmentListener);
- mFavoritesFragment.setColumnCount(FAVORITES_COLUMN_COUNT);
mFavoritesFragment.setDisplayType(DisplayType.STARRED_ONLY);
}
}
@@ -287,6 +306,13 @@
mActionBarAdapter.onCreate(savedState, mRequest, getActionBar(), !mContentPaneDisplayed);
mActionBarAdapter.setContactListFilterController(mContactListFilterController);
+ ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
+ ContactDetailTabCarousel tabCarousel = (ContactDetailTabCarousel)
+ findViewById(R.id.tab_carousel);
+ mContactDetailLayoutController = new ContactDetailLayoutController(
+ getFragmentManager(), viewPager, tabCarousel,
+ mContactDetailFragmentListener);
+
if (createContentView) {
actionBar.removeAllTabs();
Tab favoritesTab = actionBar.newTab();
@@ -298,7 +324,7 @@
Tab peopleTab = actionBar.newTab();
peopleTab.setText(getString(R.string.people));
peopleTab.setTabListener(new TabChangeListener(mContactsFragment,
- mContactDetailFragment, TabState.CONTACTS));
+ mContactDetailLoaderFragment, TabState.CONTACTS));
actionBar.addTab(peopleTab);
Tab groupsTab = actionBar.newTab();
@@ -491,7 +517,7 @@
}
private void setupContactDetailFragment(final Uri contactLookupUri) {
- mContactDetailFragment.loadUri(contactLookupUri);
+ mContactDetailLoaderFragment.loadUri(contactLookupUri);
invalidateOptionsMenuIfNeeded();
}
@@ -730,19 +756,49 @@
}
}
- private class ContactDetailFragmentListener implements ContactDetailFragment.Listener {
+ private class ContactDetailLoaderFragmentListener implements ContactLoaderFragmentListener {
@Override
public void onContactNotFound() {
// Nothing needs to be done here
}
@Override
+ public void onDetailsLoaded(final ContactLoader.Result result) {
+ if (result == null) {
+ return;
+ }
+ // Since {@link FragmentTransaction}s cannot be done in the onLoadFinished() of the
+ // {@link LoaderCallbacks}, then post this {@link Runnable} to the {@link Handler}
+ // on the main thread to execute later.
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ if (!mContactDetailLayoutController.isInitialized()) {
+ mContactDetailLayoutController.setContactDetailFragment(
+ mContactDetailFragment);
+ mContactDetailLayoutController.setContactDetailUpdatesFragment(
+ mContactDetailUpdatesFragment);
+ mContactDetailLayoutController.initialize();
+ }
+ mContactDetailLayoutController.setContactData(result);
+ }
+ });
+ }
+
+ @Override
public void onEditRequested(Uri contactLookupUri) {
startActivityForResult(
new Intent(Intent.ACTION_EDIT, contactLookupUri), SUBACTIVITY_EDIT_CONTACT);
}
@Override
+ public void onDeleteRequested(Uri contactUri) {
+ ContactDeletionInteraction.start(PeopleActivity.this, contactUri, false);
+ }
+ }
+
+ public class ContactDetailFragmentListener implements ContactDetailFragment.Listener {
+ @Override
public void onItemClicked(Intent intent) {
try {
startActivity(intent);
@@ -752,11 +808,6 @@
}
@Override
- public void onDeleteRequested(Uri contactUri) {
- ContactDeletionInteraction.start(PeopleActivity.this, contactUri, false);
- }
-
- @Override
public void onCreateRawContactRequested(ArrayList<ContentValues> values, Account account) {
Toast.makeText(PeopleActivity.this, R.string.toast_making_personal_copy,
Toast.LENGTH_LONG).show();
@@ -929,7 +980,8 @@
return true;
}
- if (mContactDetailFragment != null && mContactDetailFragment.isOptionsMenuChanged()) {
+ if (mContactDetailLoaderFragment != null &&
+ mContactDetailLoaderFragment.isOptionsMenuChanged()) {
return true;
}
@@ -1198,6 +1250,9 @@
if (mActionBarAdapter != null) {
mActionBarAdapter.onSaveInstanceState(outState);
}
+ if (mContactDetailLayoutController != null) {
+ mContactDetailLayoutController.onSaveInstanceState(outState);
+ }
}
@Override
@@ -1207,6 +1262,9 @@
if (mActionBarAdapter != null) {
mActionBarAdapter.onRestoreInstanceState(inState);
}
+ if (mContactDetailLayoutController != null) {
+ mContactDetailLayoutController.onRestoreInstanceState(inState);
+ }
}
@Override
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 1f7fac8..677b73a 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -19,7 +19,6 @@
import com.android.contacts.Collapser;
import com.android.contacts.Collapser.Collapsible;
import com.android.contacts.ContactLoader;
-import com.android.contacts.ContactOptionsActivity;
import com.android.contacts.ContactPresenceIconUtil;
import com.android.contacts.ContactSaveService;
import com.android.contacts.ContactsUtils;
@@ -41,13 +40,9 @@
import com.android.internal.telephony.ITelephony;
import android.accounts.Account;
-import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
-import android.app.LoaderManager;
-import android.app.LoaderManager.LoaderCallbacks;
import android.app.SearchManager;
-import android.content.ActivityNotFoundException;
import android.content.ClipboardManager;
import android.content.ContentUris;
import android.content.ContentValues;
@@ -55,7 +50,6 @@
import android.content.Entity;
import android.content.Entity.NamedContentValues;
import android.content.Intent;
-import android.content.Loader;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.net.ParseException;
@@ -90,9 +84,6 @@
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -137,17 +128,12 @@
private Uri mPrimaryPhoneUri = null;
private Button mCopyGalToLocalButton;
- private boolean mAllRestricted;
private final ArrayList<Long> mWritableRawContactIds = new ArrayList<Long>();
private int mNumPhoneNumbers = 0;
private String mDefaultCountryIso;
private boolean mContactDataDisplayed;
private boolean mContactPhotoDisplayedInHeader = true;
- private boolean mOptionsMenuOptions;
- private boolean mOptionsMenuEditable;
- private boolean mOptionsMenuShareable;
-
/**
* Device capability: Set during buildEntries and used in the long-press context menu
*/
@@ -245,8 +231,6 @@
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
mView = inflater.inflate(R.layout.contact_detail_fragment, container, false);
- setHasOptionsMenu(true);
-
mInflater = inflater;
mPhotoView = (ImageView) mView.findViewById(R.id.photo);
@@ -336,37 +320,6 @@
return mLookupUri;
}
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- super.onActivityCreated(savedInstanceState);
-
- if (mLookupUri != null) {
- Bundle args = new Bundle();
- args.putParcelable(LOADER_ARG_CONTACT_URI, mLookupUri);
- getLoaderManager().initLoader(LOADER_DETAILS, args, mDetailLoaderListener);
- }
- }
-
- public void loadUri(Uri lookupUri) {
- if ((lookupUri != null && lookupUri.equals(mLookupUri))
- || (lookupUri == null && mLookupUri == null)) {
- return;
- }
-
- mLookupUri = lookupUri;
- mTransitionAnimationRequested = mContactDataDisplayed;
- mContactDataDisplayed = true;
- if (mLookupUri == null) {
- getLoaderManager().destroyLoader(LOADER_DETAILS);
- mContactData = null;
- bindData();
- } else if (getActivity() != null) {
- Bundle args = new Bundle();
- args.putParcelable(LOADER_ARG_CONTACT_URI, mLookupUri);
- getLoaderManager().restartLoader(LOADER_DETAILS, args, mDetailLoaderListener);
- }
- }
-
/**
* Sets whether or not the contact photo should be shown in the list of contact details in this
* {@link Fragment}.
@@ -458,7 +411,6 @@
mRawContactIds.clear();
- mAllRestricted = true;
mPrimaryPhoneUri = null;
mNumPhoneNumbers = 0;
@@ -477,11 +429,6 @@
final String accountType = entValues.getAsString(RawContacts.ACCOUNT_TYPE);
final long rawContactId = entValues.getAsLong(RawContacts._ID);
- // Mark when this contact has any unrestricted components
- Integer restricted = entValues.getAsInteger(RawContacts.IS_RESTRICTED);
- final boolean isRestricted = restricted != null && restricted != 0;
- if (!isRestricted) mAllRestricted = false;
-
if (!mRawContactIds.contains(rawContactId)) {
mRawContactIds.add(rawContactId);
}
@@ -1392,95 +1339,6 @@
}
}
- @Override
- public void onCreateOptionsMenu(Menu menu, final MenuInflater inflater) {
- inflater.inflate(R.menu.view_contact, menu);
- }
-
- public boolean isOptionsMenuChanged() {
- return mOptionsMenuOptions != isContactOptionsChangeEnabled()
- || mOptionsMenuEditable != isContactEditable()
- || mOptionsMenuShareable != isContactShareable();
- }
-
- @Override
- public void onPrepareOptionsMenu(Menu menu) {
- mOptionsMenuOptions = isContactOptionsChangeEnabled();
- mOptionsMenuEditable = isContactEditable();
- mOptionsMenuShareable = isContactShareable();
-
- // Options only shows telephony-related settings (ringtone, send to voicemail).
- // ==> Hide if we don't have a telephone
- final MenuItem optionsMenu = menu.findItem(R.id.menu_options);
- optionsMenu.setVisible(mOptionsMenuOptions);
-
- final MenuItem editMenu = menu.findItem(R.id.menu_edit);
- editMenu.setVisible(mOptionsMenuEditable);
-
- final MenuItem deleteMenu = menu.findItem(R.id.menu_delete);
- deleteMenu.setVisible(mOptionsMenuEditable);
-
- final MenuItem shareMenu = menu.findItem(R.id.menu_share);
- shareMenu.setVisible(mOptionsMenuShareable);
- }
-
- public boolean isContactOptionsChangeEnabled() {
- return mContactData != null && !mContactData.isDirectoryEntry()
- && PhoneCapabilityTester.isPhone(mContext);
- }
-
- public boolean isContactEditable() {
- return mContactData != null && !mContactData.isDirectoryEntry();
- }
-
- public boolean isContactShareable() {
- return mContactData != null && !mContactData.isDirectoryEntry() && !mAllRestricted;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.menu_edit: {
- if (mListener != null) mListener.onEditRequested(mLookupUri);
- break;
- }
- case R.id.menu_delete: {
- if (mListener != null) mListener.onDeleteRequested(mLookupUri);
- return true;
- }
- case R.id.menu_options: {
- if (mContactData == null) return false;
- final Intent intent = new Intent(mContext, ContactOptionsActivity.class);
- intent.setData(mContactData.getLookupUri());
- mContext.startActivity(intent);
- return true;
- }
- case R.id.menu_share: {
- if (mAllRestricted) return false;
- if (mContactData == null) return false;
-
- final String lookupKey = mContactData.getLookupKey();
- final Uri shareUri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
-
- final Intent intent = new Intent(Intent.ACTION_SEND);
- intent.setType(Contacts.CONTENT_VCARD_TYPE);
- intent.putExtra(Intent.EXTRA_STREAM, shareUri);
-
- // Launch chooser to share contact via
- final CharSequence chooseTitle = mContext.getText(R.string.share_via);
- final Intent chooseIntent = Intent.createChooser(intent, chooseTitle);
-
- try {
- mContext.startActivity(chooseIntent);
- } catch (ActivityNotFoundException ex) {
- Toast.makeText(mContext, R.string.share_error, Toast.LENGTH_SHORT).show();
- }
- return true;
- }
- }
- return false;
- }
-
private void makePersonalCopy() {
if (mListener == null) {
return;
@@ -1588,76 +1446,18 @@
}
return false;
}
-
- case KeyEvent.KEYCODE_DEL: {
- if (mListener != null) mListener.onDeleteRequested(mLookupUri);
- return true;
- }
}
return false;
}
- /**
- * The listener for the detail loader
- */
- private final LoaderManager.LoaderCallbacks<ContactLoader.Result> mDetailLoaderListener =
- new LoaderCallbacks<ContactLoader.Result>() {
- @Override
- public Loader<ContactLoader.Result> onCreateLoader(int id, Bundle args) {
- Uri lookupUri = args.getParcelable(LOADER_ARG_CONTACT_URI);
- return new ContactLoader(mContext, lookupUri, true /* loadGroupMetaData */);
- }
-
- @Override
- public void onLoadFinished(Loader<ContactLoader.Result> loader, ContactLoader.Result data) {
- if (!mLookupUri.equals(data.getUri())) {
- return;
- }
-
- if (data != ContactLoader.Result.NOT_FOUND && data != ContactLoader.Result.ERROR) {
- mContactData = data;
- } else {
- Log.i(TAG, "No contact found: " + ((ContactLoader)loader).getLookupUri());
- mContactData = null;
- }
-
- bindData();
-
- if (mContactData == null && mListener != null) {
- mListener.onContactNotFound();
- }
- }
-
- public void onLoaderReset(Loader<ContactLoader.Result> loader) {
- mContactData = null;
- bindData();
- }
- };
-
public static interface Listener {
/**
- * Contact was not found, so somehow close this fragment. This is raised after a contact
- * is removed via Menu/Delete
- */
- public void onContactNotFound();
-
- /**
- * User decided to go to Edit-Mode
- */
- public void onEditRequested(Uri lookupUri);
-
- /**
* User clicked a single item (e.g. mail)
*/
public void onItemClicked(Intent intent);
/**
- * User decided to delete the contact
- */
- public void onDeleteRequested(Uri lookupUri);
-
- /**
* User requested creation of a new contact with the specified values.
*
* @param values ContentValues containing data rows for the new contact.
diff --git a/src/com/android/contacts/detail/ContactDetailLayoutController.java b/src/com/android/contacts/detail/ContactDetailLayoutController.java
new file mode 100644
index 0000000..826d720
--- /dev/null
+++ b/src/com/android/contacts/detail/ContactDetailLayoutController.java
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.contacts.detail;
+
+import com.android.contacts.ContactLoader;
+import com.android.contacts.activities.PeopleActivity.ContactDetailFragmentListener;
+
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.app.FragmentTransaction;
+import android.os.Bundle;
+import android.support.v13.app.FragmentPagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.support.v4.view.ViewPager.OnPageChangeListener;
+import android.view.View;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+
+/**
+ * Determines the layout of the contact card.
+ */
+public class ContactDetailLayoutController {
+
+ public static final int FRAGMENT_COUNT = 2;
+
+ private static final String KEY_DETAIL_FRAGMENT_TAG = "detailFragTag";
+ private static final String KEY_UPDATES_FRAGMENT_TAG = "updatesFragTag";
+
+ private String mDetailFragmentTag;
+ private String mUpdatesFragmentTag;
+
+ private enum LayoutMode {
+ TWO_COLUMN, VIEW_PAGER_AND_CAROUSEL,
+ }
+
+ private final FragmentManager mFragmentManager;
+
+ private ContactDetailFragment mContactDetailFragment;
+ private ContactDetailUpdatesFragment mContactDetailUpdatesFragment;
+
+ private final ViewPager mViewPager;
+ private final ContactDetailTabCarousel mTabCarousel;
+ private ContactDetailFragment mPagerContactDetailFragment;
+ private ContactDetailUpdatesFragment mPagerContactDetailUpdatesFragment;
+
+ private ContactDetailFragmentListener mContactDetailFragmentListener;
+
+ private ContactLoader.Result mContactData;
+
+ private boolean mIsInitialized;
+
+ private LayoutMode mLayoutMode;
+
+ public ContactDetailLayoutController(FragmentManager fragmentManager, ViewPager viewPager,
+ ContactDetailTabCarousel tabCarousel, ContactDetailFragmentListener
+ contactDetailFragmentListener) {
+ if (fragmentManager == null) {
+ throw new IllegalStateException("Cannot initialize a ContactDetailLayoutController "
+ + "without a non-null FragmentManager");
+ }
+
+ mFragmentManager = fragmentManager;
+ mViewPager = viewPager;
+ mTabCarousel = tabCarousel;
+ mContactDetailFragmentListener = contactDetailFragmentListener;
+
+ // Determine the layout based on whether the {@link ViewPager} is null or not. If the
+ // {@link ViewPager} is null, then this is a wide screen and the content can be displayed
+ // in 2 columns side by side. If the {@link ViewPager} is non-null, then this is a narrow
+ // screen and the user will need to swipe to see all the data.
+ mLayoutMode = (mViewPager == null) ? LayoutMode.TWO_COLUMN :
+ LayoutMode.VIEW_PAGER_AND_CAROUSEL;
+
+ }
+
+ public boolean isInitialized() {
+ return mIsInitialized;
+ }
+
+ public void initialize() {
+ mIsInitialized = true;
+ if (mDetailFragmentTag != null || mUpdatesFragmentTag != null) {
+ // Manually remove any {@link ViewPager} fragments if there was an orientation change
+ ContactDetailFragment oldDetailFragment = (ContactDetailFragment) mFragmentManager.
+ findFragmentByTag(mDetailFragmentTag);
+ ContactDetailUpdatesFragment oldUpdatesFragment = (ContactDetailUpdatesFragment)
+ mFragmentManager.findFragmentByTag(mUpdatesFragmentTag);
+
+ if (oldDetailFragment != null && oldUpdatesFragment != null) {
+ FragmentTransaction ft = mFragmentManager.beginTransaction();
+ ft.remove(oldDetailFragment);
+ ft.remove(oldUpdatesFragment);
+ ft.commit();
+ }
+ }
+ if (mViewPager != null) {
+ mViewPager.setAdapter(new ViewPagerAdapter(mFragmentManager));
+ mViewPager.setOnPageChangeListener(mOnPageChangeListener);
+ mTabCarousel.setListener(mTabCarouselListener);
+ }
+ }
+
+ public void setContactDetailFragment(ContactDetailFragment contactDetailFragment) {
+ mContactDetailFragment = contactDetailFragment;
+ }
+
+ public void setContactDetailUpdatesFragment(ContactDetailUpdatesFragment updatesFragment) {
+ mContactDetailUpdatesFragment = updatesFragment;
+ }
+
+ public void setContactData(ContactLoader.Result data) {
+ mContactData = data;
+ if (mContactData.getSocialSnippet() != null) {
+ showContactWithUpdates();
+ } else {
+ showContactWithoutUpdates();
+ }
+ }
+
+ private void showContactWithUpdates() {
+ FragmentTransaction ft = mFragmentManager.beginTransaction();
+
+ switch (mLayoutMode) {
+ case TWO_COLUMN: {
+ // Set the contact data
+ mContactDetailFragment.setData(mContactData.getLookupUri(), mContactData);
+ mContactDetailUpdatesFragment.setData(mContactData.getLookupUri(), mContactData);
+
+ // Update fragment visibility
+ ft.show(mContactDetailUpdatesFragment);
+ break;
+ }
+ case VIEW_PAGER_AND_CAROUSEL: {
+ // Set the contact data
+ mTabCarousel.loadData(mContactData);
+ mPagerContactDetailFragment.setData(mContactData.getLookupUri(), mContactData);
+ mPagerContactDetailUpdatesFragment.setData(mContactData.getLookupUri(),
+ mContactData);
+
+ // Update fragment and view visibility
+ mViewPager.setVisibility(View.VISIBLE);
+ mTabCarousel.setVisibility(View.VISIBLE);
+ ft.hide(mContactDetailFragment);
+ break;
+ }
+ default:
+ throw new IllegalStateException("Invalid LayoutMode " + mLayoutMode);
+ }
+
+ ft.commit();
+ }
+
+ private void showContactWithoutUpdates() {
+ FragmentTransaction ft = mFragmentManager.beginTransaction();
+
+ switch (mLayoutMode) {
+ case TWO_COLUMN:
+ mContactDetailFragment.setData(mContactData.getLookupUri(), mContactData);
+ ft.hide(mContactDetailUpdatesFragment);
+ break;
+ case VIEW_PAGER_AND_CAROUSEL:
+ mContactDetailFragment.setData(mContactData.getLookupUri(), mContactData);
+ ft.show(mContactDetailFragment);
+ mViewPager.setVisibility(View.GONE);
+ mTabCarousel.setVisibility(View.GONE);
+ break;
+ default:
+ throw new IllegalStateException("Invalid LayoutMode " + mLayoutMode);
+ }
+
+ ft.commit();
+ }
+
+ public void onSaveInstanceState(Bundle outState) {
+ if (mPagerContactDetailFragment != null) {
+ outState.putString(KEY_DETAIL_FRAGMENT_TAG,
+ mPagerContactDetailFragment.getTag());
+ outState.putString(KEY_UPDATES_FRAGMENT_TAG,
+ mPagerContactDetailUpdatesFragment.getTag());
+ }
+ }
+
+ public void onRestoreInstanceState(Bundle savedState) {
+ mDetailFragmentTag = savedState.getString(KEY_DETAIL_FRAGMENT_TAG);
+ mUpdatesFragmentTag = savedState.getString(KEY_UPDATES_FRAGMENT_TAG);
+ }
+
+ public class ViewPagerAdapter extends FragmentPagerAdapter{
+
+ public ViewPagerAdapter(FragmentManager fm) {
+ super(fm);
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+ switch (position) {
+ case 0:
+ mPagerContactDetailFragment = new ContactDetailFragment();
+ if (mContactData != null) {
+ mPagerContactDetailFragment.setData(mContactData.getLookupUri(),
+ mContactData);
+ }
+ mPagerContactDetailFragment.setListener(mContactDetailFragmentListener);
+ mPagerContactDetailFragment.setVerticalScrollListener(mVerticalScrollListener);
+ mPagerContactDetailFragment.setShowPhotoInHeader(false);
+ return mPagerContactDetailFragment;
+ case 1:
+ mPagerContactDetailUpdatesFragment = new ContactDetailUpdatesFragment();
+ if (mContactData != null) {
+ mPagerContactDetailUpdatesFragment.setData(mContactData.getLookupUri(),
+ mContactData);
+ }
+ return mPagerContactDetailUpdatesFragment;
+ }
+ throw new IllegalStateException("No fragment at position " + position);
+ }
+
+ @Override
+ public int getCount() {
+ return FRAGMENT_COUNT;
+ }
+ }
+
+ private OnPageChangeListener mOnPageChangeListener = new OnPageChangeListener() {
+
+ @Override
+ public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+ // The user is horizontally dragging the {@link ViewPager}, so send
+ // these scroll changes to the tab carousel. Ignore these events though if the carousel
+ // is actually controlling the {@link ViewPager} scrolls because it will already be
+ // in the correct position.
+ if (mViewPager.isFakeDragging()) {
+ return;
+ }
+ int x = (int) ((position + positionOffset) *
+ mTabCarousel.getAllowedHorizontalScrollLength());
+ mTabCarousel.scrollTo(x, 0);
+ }
+
+ @Override
+ public void onPageSelected(int position) {
+ // Since a new page has been selected by the {@link ViewPager},
+ // update the tab selection in the carousel.
+ mTabCarousel.setCurrentTab(position);
+ }
+
+ @Override
+ public void onPageScrollStateChanged(int state) {}
+
+ };
+
+ private ContactDetailTabCarousel.Listener mTabCarouselListener =
+ new ContactDetailTabCarousel.Listener() {
+
+ @Override
+ public void onTouchDown() {
+ // The user just started scrolling the carousel, so begin "fake dragging" the
+ // {@link ViewPager} if it's not already doing so.
+ if (mViewPager.isFakeDragging()) {
+ return;
+ }
+ mViewPager.beginFakeDrag();
+ }
+
+ @Override
+ public void onTouchUp() {
+ // The user just stopped scrolling the carousel, so stop "fake dragging" the
+ // {@link ViewPager} if was doing so before.
+ if (mViewPager.isFakeDragging()) {
+ mViewPager.endFakeDrag();
+ }
+ }
+
+ @Override
+ public void onScrollChanged(int l, int t, int oldl, int oldt) {
+ // The user is scrolling the carousel, so send the scroll deltas to the
+ // {@link ViewPager} so it can move in sync.
+ if (mViewPager.isFakeDragging()) {
+ mViewPager.fakeDragBy(oldl-l);
+ }
+ }
+
+ @Override
+ public void onTabSelected(int position) {
+ // The user selected a tab, so update the {@link ViewPager}
+ mViewPager.setCurrentItem(position);
+ }
+ };
+
+ private OnScrollListener mVerticalScrollListener = new OnScrollListener() {
+
+ @Override
+ public void onScroll(
+ AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
+ if (mTabCarousel == null) {
+ return;
+ }
+ // If the FIRST item is not visible on the screen, then the carousel must be pinned
+ // at the top of the screen.
+ if (firstVisibleItem != 0) {
+ mTabCarousel.setY(-mTabCarousel.getAllowedVerticalScrollLength());
+ return;
+ }
+ View topView = view.getChildAt(firstVisibleItem);
+ if (topView == null) {
+ return;
+ }
+ int amtToScroll = Math.max((int) view.getChildAt(firstVisibleItem).getY(),
+ -mTabCarousel.getAllowedVerticalScrollLength());
+ mTabCarousel.setY(amtToScroll);
+ }
+
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {}
+
+ };
+}
diff --git a/src/com/android/contacts/detail/ContactLoaderFragment.java b/src/com/android/contacts/detail/ContactLoaderFragment.java
index 3ece0ce..5504473 100644
--- a/src/com/android/contacts/detail/ContactLoaderFragment.java
+++ b/src/com/android/contacts/detail/ContactLoaderFragment.java
@@ -17,36 +17,74 @@
package com.android.contacts.detail;
import com.android.contacts.ContactLoader;
+import com.android.contacts.ContactOptionsActivity;
import com.android.contacts.R;
+import com.android.contacts.activities.ContactDetailActivity.FragmentKeyListener;
+import com.android.contacts.util.PhoneCapabilityTester;
import com.android.internal.util.Objects;
import android.app.Activity;
import android.app.Fragment;
import android.app.LoaderManager;
import android.app.LoaderManager.LoaderCallbacks;
+import android.content.ActivityNotFoundException;
+import android.content.ContentValues;
import android.content.Context;
+import android.content.Entity;
+import android.content.Intent;
import android.content.Loader;
import android.net.Uri;
import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.RawContacts;
import android.util.Log;
+import android.view.KeyEvent;
import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.Toast;
/**
* This is an invisible worker {@link Fragment} that loads the contact details for the contact card.
* The data is then passed to the listener, who can then pass the data to other {@link View}s.
*/
-public class ContactLoaderFragment extends Fragment {
+public class ContactLoaderFragment extends Fragment implements FragmentKeyListener {
private static final String TAG = ContactLoaderFragment.class.getSimpleName();
+ private boolean mOptionsMenuOptions;
+ private boolean mOptionsMenuEditable;
+ private boolean mOptionsMenuShareable;
+
/**
* This is a listener to the {@link ContactLoaderFragment} and will be notified when the
- * contact details have finished loading.
+ * contact details have finished loading or if the user selects any menu options.
*/
public static interface ContactLoaderFragmentListener {
+ /**
+ * Contact was not found, so somehow close this fragment. This is raised after a contact
+ * is removed via Menu/Delete
+ */
+ public void onContactNotFound();
+
+ /**
+ * Contact details have finished loading.
+ */
public void onDetailsLoaded(ContactLoader.Result result);
+
+ /**
+ * User decided to go to Edit-Mode
+ */
+ public void onEditRequested(Uri lookupUri);
+
+ /**
+ * User decided to delete the contact
+ */
+ public void onDeleteRequested(Uri lookupUri);
+
}
private static final int LOADER_DETAILS = 1;
@@ -60,6 +98,8 @@
private ContactLoader.Result mContactData;
+ private boolean mAllRestricted;
+
public ContactLoaderFragment() {
}
@@ -85,6 +125,7 @@
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
+ setHasOptionsMenu(true);
// This is an empty view that is set to visibility gone.
return inflater.inflate(R.layout.contact_detail_loader_fragment, container, false);
}
@@ -148,8 +189,22 @@
mContactData = null;
}
+ mAllRestricted = true;
+
+ for (Entity entity: mContactData.getEntities()) {
+ final ContentValues entValues = entity.getEntityValues();
+ // Mark when this contact has any unrestricted components
+ Integer restricted = entValues.getAsInteger(RawContacts.IS_RESTRICTED);
+ final boolean isRestricted = restricted != null && restricted != 0;
+ if (!isRestricted) mAllRestricted = false;
+ }
+
if (mListener != null) {
- mListener.onDetailsLoaded(mContactData);
+ if (mContactData == null) {
+ mListener.onContactNotFound();
+ } else {
+ mListener.onDetailsLoaded(mContactData);
+ }
}
}
@@ -160,4 +215,105 @@
}
}
};
+
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, final MenuInflater inflater) {
+ inflater.inflate(R.menu.view_contact, menu);
+ }
+
+ public boolean isOptionsMenuChanged() {
+ return mOptionsMenuOptions != isContactOptionsChangeEnabled()
+ || mOptionsMenuEditable != isContactEditable()
+ || mOptionsMenuShareable != isContactShareable();
+ }
+
+ @Override
+ public void onPrepareOptionsMenu(Menu menu) {
+ mOptionsMenuOptions = isContactOptionsChangeEnabled();
+ mOptionsMenuEditable = isContactEditable();
+ mOptionsMenuShareable = isContactShareable();
+
+ // Options only shows telephony-related settings (ringtone, send to voicemail).
+ // ==> Hide if we don't have a telephone
+ final MenuItem optionsMenu = menu.findItem(R.id.menu_options);
+ optionsMenu.setVisible(mOptionsMenuOptions);
+
+ final MenuItem editMenu = menu.findItem(R.id.menu_edit);
+ editMenu.setVisible(mOptionsMenuEditable);
+
+ final MenuItem deleteMenu = menu.findItem(R.id.menu_delete);
+ deleteMenu.setVisible(mOptionsMenuEditable);
+
+ final MenuItem shareMenu = menu.findItem(R.id.menu_share);
+ shareMenu.setVisible(mOptionsMenuShareable);
+ }
+
+ public boolean isContactOptionsChangeEnabled() {
+ return mContactData != null && !mContactData.isDirectoryEntry()
+ && PhoneCapabilityTester.isPhone(mContext);
+ }
+
+ public boolean isContactEditable() {
+ return mContactData != null && !mContactData.isDirectoryEntry();
+ }
+
+ public boolean isContactShareable() {
+ return mContactData != null && !mContactData.isDirectoryEntry() && !mAllRestricted;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.menu_edit: {
+ if (mListener != null) mListener.onEditRequested(mLookupUri);
+ break;
+ }
+ case R.id.menu_delete: {
+ if (mListener != null) mListener.onDeleteRequested(mLookupUri);
+ return true;
+ }
+ case R.id.menu_options: {
+ if (mContactData == null) return false;
+ final Intent intent = new Intent(mContext, ContactOptionsActivity.class);
+ intent.setData(mContactData.getLookupUri());
+ mContext.startActivity(intent);
+ return true;
+ }
+ case R.id.menu_share: {
+ if (mAllRestricted) return false;
+ if (mContactData == null) return false;
+
+ final String lookupKey = mContactData.getLookupKey();
+ final Uri shareUri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
+
+ final Intent intent = new Intent(Intent.ACTION_SEND);
+ intent.setType(Contacts.CONTENT_VCARD_TYPE);
+ intent.putExtra(Intent.EXTRA_STREAM, shareUri);
+
+ // Launch chooser to share contact via
+ final CharSequence chooseTitle = mContext.getText(R.string.share_via);
+ final Intent chooseIntent = Intent.createChooser(intent, chooseTitle);
+
+ try {
+ mContext.startActivity(chooseIntent);
+ } catch (ActivityNotFoundException ex) {
+ Toast.makeText(mContext, R.string.share_error, Toast.LENGTH_SHORT).show();
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean handleKeyDown(int keyCode) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DEL: {
+ if (mListener != null) mListener.onDeleteRequested(mLookupUri);
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/src/com/android/contacts/group/GroupBrowseListFragment.java b/src/com/android/contacts/group/GroupBrowseListFragment.java
index 95a85b6..59b0cec 100644
--- a/src/com/android/contacts/group/GroupBrowseListFragment.java
+++ b/src/com/android/contacts/group/GroupBrowseListFragment.java
@@ -33,6 +33,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract.Groups;
+import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -77,6 +78,8 @@
private boolean mSelectionToScreenRequested;
+ private static final String EXTRA_KEY_GROUP_URI = "groups.groupUri";
+
/**
* Map of account name to a list of {@link GroupMetaData} objects
* representing groups within that account.
@@ -108,6 +111,13 @@
mListView.setOnFocusChangeListener(this);
mListView.setOnTouchListener(this);
mEmptyView = mRootView.findViewById(R.id.empty);
+
+ if (savedInstanceState != null) {
+ String groupUriString = savedInstanceState.getString(EXTRA_KEY_GROUP_URI);
+ if (groupUriString != null) {
+ mSelectedGroupUri = Uri.parse(groupUriString);
+ }
+ }
return mRootView;
}
@@ -230,6 +240,10 @@
if (mSelectionToScreenRequested) {
requestSelectionToScreen();
}
+
+ if (mSelectionVisible && mSelectedGroupUri != null) {
+ viewGroup(mSelectedGroupUri);
+ }
}
public void setListener(OnGroupBrowserActionListener listener) {
@@ -293,4 +307,15 @@
}
return false;
}
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ if (mSelectedGroupUri != null) {
+ String uriString = mSelectedGroupUri.toString();
+ if (!TextUtils.isEmpty(uriString)) {
+ outState.putString(EXTRA_KEY_GROUP_URI, uriString);
+ }
+ }
+ }
}
diff --git a/src/com/android/contacts/group/GroupDetailFragment.java b/src/com/android/contacts/group/GroupDetailFragment.java
index 9784187..c4824ae 100644
--- a/src/com/android/contacts/group/GroupDetailFragment.java
+++ b/src/com/android/contacts/group/GroupDetailFragment.java
@@ -31,6 +31,7 @@
import android.content.Context;
import android.content.CursorLoader;
import android.content.Loader;
+import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
@@ -44,7 +45,6 @@
import android.widget.AbsListView.OnScrollListener;
import android.widget.ListView;
import android.widget.TextView;
-import android.widget.Toast;
/**
* Displays the details of a group and shows a list of actions possible for the group.
@@ -72,7 +72,6 @@
private static final int LOADER_METADATA = 0;
private static final int LOADER_MEMBERS = 1;
- private static final int NUM_COLS = 4;
private Context mContext;
@@ -99,7 +98,11 @@
public void onAttach(Activity activity) {
super.onAttach(activity);
mContext = activity;
- mAdapter = new ContactTileAdapter(activity, mContactTileListener, NUM_COLS,
+
+ Resources res = getResources();
+ int columnCount = res.getInteger(R.integer.contact_tile_column_count);
+
+ mAdapter = new ContactTileAdapter(activity, mContactTileListener, columnCount,
DisplayType.GROUP_MEMBERS);
configurePhotoLoader();
}
diff --git a/src/com/android/contacts/list/StrequentContactListFragment.java b/src/com/android/contacts/list/StrequentContactListFragment.java
index e0f0dc1..18edaea 100644
--- a/src/com/android/contacts/list/StrequentContactListFragment.java
+++ b/src/com/android/contacts/list/StrequentContactListFragment.java
@@ -26,6 +26,7 @@
import android.app.LoaderManager.LoaderCallbacks;
import android.content.CursorLoader;
import android.content.Loader;
+import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
@@ -44,7 +45,6 @@
}
private static int LOADER_STREQUENT = 1;
- private static final int NUM_COLS = 2;
private Listener mListener;
private ContactTileAdapter mAdapter;
@@ -53,8 +53,12 @@
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
+
+ Resources res = getResources();
+ int columnCount = res.getInteger(R.integer.contact_tile_column_count);
+
mAdapter = new ContactTileAdapter(activity, mAdapterListener,
- NUM_COLS, DisplayType.STREQUENT);
+ columnCount, DisplayType.STREQUENT);
mAdapter.setPhotoLoader(ContactPhotoManager.getInstance(activity));
}
diff --git a/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java b/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
index ab00382..5c02959 100644
--- a/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
+++ b/tests/src/com/android/contacts/PhoneCallDetailsHelperTest.java
@@ -16,13 +16,22 @@
package com.android.contacts;
+import com.android.contacts.util.LocaleTestUtils;
import com.android.internal.telephony.CallerInfo;
import android.content.Context;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import android.provider.CallLog.Calls;
import android.test.AndroidTestCase;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.TextView;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+
/**
* Unit tests for {@link PhoneCallDetailsHelper}.
*/
@@ -31,6 +40,16 @@
private static final String TEST_VOICEMAIL_NUMBER = "125";
/** The date of the call log entry. */
private static final long TEST_DATE = 1300000000;
+ /** The number of the caller/callee in the log entry. */
+ private static final String TEST_NUMBER = "1-412-555-5555";
+ /** A drawable to be used for incoming calls. */
+ private static final Drawable TEST_INCOMING_DRAWABLE = new ColorDrawable(Color.BLACK);
+ /** A drawable to be used for outgoing calls. */
+ private static final Drawable TEST_OUTGOING_DRAWABLE = new ColorDrawable(Color.BLUE);
+ /** A drawable to be used for missed calls. */
+ private static final Drawable TEST_MISSED_DRAWABLE = new ColorDrawable(Color.RED);
+ /** A drawable to be used for voicemails. */
+ private static final Drawable TEST_VOICEMAIL_DRAWABLE = new ColorDrawable(Color.CYAN);
/** The object under test. */
private PhoneCallDetailsHelper mHelper;
@@ -41,9 +60,11 @@
protected void setUp() throws Exception {
super.setUp();
Context context = getContext();
- mHelper = new PhoneCallDetailsHelper(context.getResources(), TEST_VOICEMAIL_NUMBER);
- mViews = PhoneCallDetailsViews.createForTest(new TextView(context), new TextView(context),
- new TextView(context));
+ mHelper = new PhoneCallDetailsHelper(context, context.getResources(),
+ TEST_VOICEMAIL_NUMBER, TEST_INCOMING_DRAWABLE, TEST_OUTGOING_DRAWABLE,
+ TEST_MISSED_DRAWABLE, TEST_VOICEMAIL_DRAWABLE);
+ mViews = PhoneCallDetailsViews.createForTest(new TextView(context),
+ new LinearLayout(context), new TextView(context), new TextView(context));
}
@Override
@@ -78,6 +99,47 @@
assertNameEquals("1-412-555-1212");
}
+ public void testSetPhoneCallDetails_Date() {
+ LocaleTestUtils localeTestUtils = new LocaleTestUtils(getContext());
+ localeTestUtils.setLocale(Locale.US);
+ try {
+ mHelper.setCurrentTimeForTest(
+ new GregorianCalendar(2011, 5, 3, 13, 0, 0).getTimeInMillis());
+
+ setPhoneCallDetailsWithDate(
+ new GregorianCalendar(2011, 5, 3, 13, 0, 0).getTimeInMillis());
+ assertDateEquals("0 mins ago");
+
+ setPhoneCallDetailsWithDate(
+ new GregorianCalendar(2011, 5, 3, 12, 0, 0).getTimeInMillis());
+ assertDateEquals("1 hour ago");
+
+ setPhoneCallDetailsWithDate(
+ new GregorianCalendar(2011, 5, 2, 13, 0, 0).getTimeInMillis());
+ assertDateEquals("yesterday");
+
+ setPhoneCallDetailsWithDate(
+ new GregorianCalendar(2011, 5, 1, 13, 0, 0).getTimeInMillis());
+ assertDateEquals("2 days ago");
+ } finally {
+ localeTestUtils.restoreLocale();
+ }
+ }
+
+ public void testSetPhoneCallDetails_CallType() {
+ setPhoneCallDetailsWithCallType(Calls.INCOMING_TYPE);
+ assertCallTypeIconsEquals(TEST_INCOMING_DRAWABLE);
+
+ setPhoneCallDetailsWithCallType(Calls.OUTGOING_TYPE);
+ assertCallTypeIconsEquals(TEST_OUTGOING_DRAWABLE);
+
+ setPhoneCallDetailsWithCallType(Calls.MISSED_TYPE);
+ assertCallTypeIconsEquals(TEST_MISSED_DRAWABLE);
+
+ setPhoneCallDetailsWithCallType(Calls.VOICEMAIL_TYPE);
+ assertCallTypeIconsEquals(TEST_VOICEMAIL_DRAWABLE);
+ }
+
/** Asserts that the name text field contains the value of the given string resource. */
private void assertNameEqualsResource(int resId) {
assertNameEquals(getContext().getString(resId));
@@ -85,11 +147,36 @@
/** Asserts that the name text field contains the given string value. */
private void assertNameEquals(String text) {
- assertEquals(text, mViews.mNameView.getText().toString());
+ assertEquals(text, mViews.nameView.getText().toString());
+ }
+
+ /** Asserts that the date text field contains the given string value. */
+ private void assertDateEquals(String text) {
+ assertEquals(text, mViews.dateView.getText().toString());
+ }
+
+ /** Asserts that the call type linear layout contains the images with the given drawables. */
+ private void assertCallTypeIconsEquals(Drawable... drawables) {
+ assertEquals(drawables.length, mViews.callTypesLayout.getChildCount());
+ for (int index = 0; index < drawables.length; ++index) {
+ Drawable drawable = drawables[index];
+ ImageView imageView = (ImageView) mViews.callTypesLayout.getChildAt(index);
+ assertEquals(drawable, imageView.getDrawable());
+ }
}
/** Sets the phone call details with default values and the given number. */
private void setPhoneCallDetailsWithNumber(String number) {
mHelper.setPhoneCallDetails(mViews, TEST_DATE, Calls.INCOMING_TYPE, "", number, 0, "");
}
+
+ /** Sets the phone call details with default values and the given date. */
+ private void setPhoneCallDetailsWithDate(long date) {
+ mHelper.setPhoneCallDetails(mViews, date, Calls.INCOMING_TYPE, "", TEST_NUMBER, 0, "");
+ }
+
+ /** Sets the phone call details with default values and the given call type. */
+ private void setPhoneCallDetailsWithCallType(int callType) {
+ mHelper.setPhoneCallDetails(mViews, TEST_DATE, callType, "", TEST_NUMBER, 0, "");
+ }
}