diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/phone_favorite_regular_row_view.xml | 52 | ||||
-rw-r--r-- | res/layout/phone_favorite_tile_view.xml | 56 | ||||
-rw-r--r-- | res/values/strings.xml | 4 |
3 files changed, 102 insertions, 10 deletions
diff --git a/res/layout/phone_favorite_regular_row_view.xml b/res/layout/phone_favorite_regular_row_view.xml index eda5a02c8..532e85854 100644 --- a/res/layout/phone_favorite_regular_row_view.xml +++ b/res/layout/phone_favorite_regular_row_view.xml @@ -18,14 +18,14 @@ <view xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/contact_tile_frequent_phone" - class="com.android.dialer.list.PhoneFavoriteRegularRowView" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" - android:nextFocusLeft="@+id/contact_tile_quick"> + class="com.android.dialer.list.PhoneFavoriteRegularRowView"> <RelativeLayout + android:id="@+id/contact_favorite_card" android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="match_parent" + android:focusable="true" + android:background="?android:attr/selectableItemBackground" > <com.android.contacts.common.widget.LayoutSuppressingQuickContactBadge android:id="@id/contact_tile_quick" @@ -54,4 +54,46 @@ android:textAlignment="viewStart" /> </RelativeLayout> + <LinearLayout + android:id="@+id/favorite_remove_dialogue" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:gravity="center_vertical" + android:alpha="0.0" + android:visibility="gone"> + + <TextView + android:id="@+id/favorite_remove_dialogue_text" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_weight="1" + android:text="@string/favorite_hidden" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_marginLeft="8dip" + android:layout_marginStart="8dip" + android:singleLine="true" + android:layout_gravity="center_vertical" + android:textDirection="ltr" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/favorite_remove_undo_button" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_weight="0.5" + android:textAppearance="?android:attr/textAppearanceSmall" + android:ellipsize="marquee" + android:singleLine="true" + android:text="@string/favorite_hidden_undo" + android:layout_marginLeft="8dip" + android:layout_marginStart="8dip" + android:gravity="end" + android:layout_gravity="center_vertical" + android:clickable="true"/> + + </LinearLayout> </view> diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml index e82a4e2f1..2865c2ade 100644 --- a/res/layout/phone_favorite_tile_view.xml +++ b/res/layout/phone_favorite_tile_view.xml @@ -16,14 +16,17 @@ <view xmlns:android="http://schemas.android.com/apk/res/android" android:background="@null" - android:paddingBottom="1dp" - android:paddingRight="1dp" - android:paddingEnd="1dp" - class="com.android.dialer.list.PhoneFavoriteTileView" > + android:paddingBottom="1dip" + android:paddingRight="1dip" + android:paddingEnd="1dip" + class="com.android.dialer.list.PhoneFavoriteSquareTileView" > <RelativeLayout + android:id="@+id/contact_tile_favorite_card" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:focusable="true" + android:background="?android:attr/selectableItemBackground" >> <com.android.contacts.common.widget.LayoutSuppressingImageView android:id="@+id/contact_tile_image" @@ -83,4 +86,47 @@ </RelativeLayout> + <LinearLayout + android:id="@+id/favorite_tile_remove_dialogue" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:gravity="center_horizontal" + android:alpha="0.0" + android:visibility="gone"> + + <TextView + android:id="@+id/favorite_tile_remove_dialogue_text" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_weight="1" + android:text="@string/favorite_hidden" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_marginLeft="8dip" + android:layout_marginStart="8dip" + android:singleLine="true" + android:layout_gravity="center_horizontal" + android:textDirection="ltr" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/favorite_tile_remove_undo_button" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_weight="0.5" + android:textAppearance="?android:attr/textAppearanceSmall" + android:ellipsize="marquee" + android:singleLine="true" + android:text="@string/favorite_hidden_undo" + android:layout_marginLeft="8dip" + android:layout_marginStart="8dip" + android:gravity="end" + android:layout_gravity="center_horizontal" + android:clickable="true"/> + + </LinearLayout> + </view> diff --git a/res/values/strings.xml b/res/values/strings.xml index 06d0a1e82..307d56b28 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -606,4 +606,8 @@ <string name="show_all_contacts_title">All contacts</string> <!-- Title of show all contacts button --> <string name="show_all_contacts_button_text">All contacts</string> + <!-- Text displayed when user swipes out a favorite contact --> + <string name="favorite_hidden">Hidden from favorites</string> + <!-- Text displayed for the undo button to undo removing a favorite contact --> + <string name="favorite_hidden_undo">Undo</string> </resources> |