Use system assets on dialpad/calllog
Since "dial" button has green background for pressed state,
we need to copy some framework assets to our project and have
btn_call.xml which is very similar to framework's
item_background_holo_dark.xml
Also use correct "pressed" state for menu buttons
Bug: 5300071
Bug: 5298218
Change-Id: I82bebecd56716934812dfd9e0a87cbc88d04ceab
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index 936bca8..a890ddf 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -156,7 +156,7 @@
android:orientation="vertical"
android:gravity="center_vertical"
android:focusable="true"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
>
<TextView android:id="@+id/call_and_sms_text"
@@ -191,7 +191,7 @@
android:gravity="center"
android:scaleType="centerInside"
android:focusable="true"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
/>
</LinearLayout>
</FrameLayout>
diff --git a/res/layout/dialpad_additional_buttons.xml b/res/layout/dialpad_additional_buttons.xml
index f0e4a42..ae37fd5 100644
--- a/res/layout/dialpad_additional_buttons.xml
+++ b/res/layout/dialpad_additional_buttons.xml
@@ -33,7 +33,7 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/description_search_button"
android:src="@drawable/ic_see_contacts_holo_dark"/>
@@ -57,7 +57,7 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:state_enabled="false"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
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 b2784e2..96cf543 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -30,30 +30,29 @@
android:layout_height="0px"
android:layout_weight="0.200"
android:layout_marginTop="@dimen/dialpad_vertical_margin"
- android:gravity="center" >
+ android:gravity="center"
+ android:background="@drawable/dialpad_background" >
- <!-- Type of this EditText is set to NULL (to disable the IME keyboard)
- in the java code.
-
- Background drawable can be controlled programatically. -->
<com.android.contacts.dialpad.DigitsEditText
android:id="@+id/digits"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
- android:layout_toLeftOf="@+id/moreoverflow"
- android:background="@drawable/dialpad_background"
android:gravity="center"
android:textAppearance="@style/DialtactsDigitsTextAppearance"
- android:textColor="?android:attr/textColorPrimary" />
+ android:textColor="?android:attr/textColorPrimary"
+ android:nextFocusRight="@+id/overflow_menu"
+ android:background="@android:color/transparent" />
- <ImageButton android:id="@+id/overflow_menu"
+ <ImageButton
+ android:id="@+id/overflow_menu"
android:layout_width="48dip"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:src="@drawable/ic_menu_overflow"
android:contentDescription="@*android:string/action_menu_overflow_description"
- android:background="@android:color/transparent"/>
+ android:nextFocusLeft="@id/digits"
+ android:background="?android:attr/selectableItemBackground"/>
</RelativeLayout>
diff --git a/res/layout/dialtacts_custom_action_bar.xml b/res/layout/dialtacts_custom_action_bar.xml
index 2be66f7..0709626 100644
--- a/res/layout/dialtacts_custom_action_bar.xml
+++ b/res/layout/dialtacts_custom_action_bar.xml
@@ -31,11 +31,12 @@
<ImageButton
android:id="@+id/search_option"
android:layout_width="wrap_content"
- android:paddingRight="8dip"
+ android:paddingLeft="4dip"
+ android:paddingRight="4dip"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:src="@drawable/ic_menu_overflow"
- android:background="@android:color/transparent"
+ android:background="?android:attr/selectableItemBackground"
android:visibility="gone" />
</LinearLayout>
diff --git a/res/layout/favorites_star.xml b/res/layout/favorites_star.xml
index 5bdc091..2ac3039 100644
--- a/res/layout/favorites_star.xml
+++ b/res/layout/favorites_star.xml
@@ -30,4 +30,4 @@
android:contentDescription="@string/description_star"
android:visibility="invisible"
android:button="@drawable/btn_star_holo_dark"/>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/playback_layout.xml b/res/layout/playback_layout.xml
index c2fdb3e..711ebf8 100644
--- a/res/layout/playback_layout.xml
+++ b/res/layout/playback_layout.xml
@@ -24,7 +24,7 @@
android:id="@+id/playback_start_stop"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_hold_pause"
/>
</LinearLayout>
@@ -38,7 +38,7 @@
android:id="@+id/playback_speakerphone"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_speakerphone_on"
/>
</LinearLayout>
@@ -97,7 +97,7 @@
android:src="@drawable/ic_minus"
android:layout_width="64dip"
android:layout_height="wrap_content"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
android:paddingBottom="19dip"
android:paddingTop="29dip"
android:layout_alignParentLeft="true"
@@ -108,7 +108,7 @@
android:src="@drawable/ic_plus"
android:layout_width="64dip"
android:layout_height="wrap_content"
- android:background="@drawable/btn_dial"
+ android:background="?android:attr/selectableItemBackground"
android:paddingBottom="19dip"
android:paddingTop="29dip"
android:layout_alignParentRight="true"