Merge "Import translations. DO NOT MERGE"
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index 15d7a92..e39b413 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -34,9 +34,20 @@
@id/call_log_item gone
-->
+ <!-- Linear layout to separate the primary area containing the contact badge and caller
+ information and the secondary action (call details / play voicemail). -->
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ >
+
+ <!-- Primary area containing the contact badge and caller information -->
<LinearLayout
android:id="@+id/primary_action_view"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:padding="@dimen/call_log_outer_margin"
@@ -46,7 +57,7 @@
android:focusable="true"
android:nextFocusRight="@+id/secondary_action_icon"
android:nextFocusLeft="@+id/quick_contact_photo"
- >
+ >
<QuickContactBadge
android:id="@+id/quick_contact_photo"
android:layout_width="@dimen/call_log_list_contact_photo_size"
@@ -54,7 +65,7 @@
android:nextFocusRight="@id/primary_action_view"
android:layout_alignParentStart="true"
android:focusable="true"
- />
+ />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -62,7 +73,7 @@
android:orientation="vertical"
android:gravity="center_vertical"
android:layout_marginStart="@dimen/call_log_inner_margin"
- >
+ >
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
@@ -71,12 +82,12 @@
android:textColor="?attr/call_log_primary_text_color"
android:textSize="16sp"
android:singleLine="true"
- />
+ />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
- >
+ >
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
@@ -87,13 +98,13 @@
android:singleLine="true"
android:ellipsize="marquee"
/>
- </LinearLayout>
+ </LinearLayout>
<LinearLayout
android:id="@+id/call_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
- >
+ >
<view
class="com.android.dialer.calllog.CallTypeIconsView"
android:id="@+id/call_type_icons"
@@ -101,7 +112,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/call_log_icon_margin"
android:layout_gravity="center_vertical"
- />
+ />
<TextView
android:id="@+id/call_count_and_date"
android:layout_width="wrap_content"
@@ -111,43 +122,43 @@
android:textColor="?attr/call_log_secondary_text_color"
android:textSize="12sp"
android:singleLine="true"
- />
+ />
</LinearLayout>
</LinearLayout>
- <!-- Linear layout to house a vertical separator line and the
- secondary action button. Used as a convenience to hide both
- the separator and action button at the same time. -->
- <LinearLayout
- android:id="@+id/secondary_action_view"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- >
- <!-- Thin vertical divider to visually separate the secondary action button -->
- <View
- android:id="@+id/vertical_divider"
- android:layout_width="@dimen/call_log_list_item_vertical_divider_width"
- android:layout_height="match_parent"
- android:layout_marginTop="@dimen/call_log_list_item_vertical_divider_margin"
- android:layout_marginBottom="@dimen/call_log_list_item_vertical_divider_margin"
- android:background="?android:attr/dividerVertical"/>
- <!-- The secondary action button; either play voicemail or call details. -->
- <ImageButton
- android:id="@+id/secondary_action_icon"
- android:layout_width="@dimen/call_log_call_action_width"
- android:layout_height="match_parent"
- android:paddingStart="@dimen/call_log_inner_margin"
- android:paddingTop="@dimen/call_log_inner_margin"
- android:paddingBottom="@dimen/call_log_inner_margin"
- android:paddingEnd="@dimen/call_log_inner_margin"
- android:scaleType="center"
- android:background="?android:attr/selectableItemBackground"
- android:nextFocusLeft="@id/primary_action_view"
- />
- </LinearLayout>
</LinearLayout>
-
+ <!-- Linear layout to house a vertical separator line and the secondary action button.
+ Used as a convenience to hide both the separator and action button at the same
+ time. -->
+ <LinearLayout
+ android:id="@+id/secondary_action_view"
+ android:layout_width="@dimen/call_log_call_action_width"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ >
+ <!-- Thin vertical divider to visually separate the secondary action button -->
+ <View
+ android:id="@+id/vertical_divider"
+ android:layout_width="@dimen/call_log_list_item_vertical_divider_width"
+ android:layout_height="match_parent"
+ android:layout_marginTop="@dimen/call_log_list_item_vertical_divider_margin"
+ android:layout_marginBottom="@dimen/call_log_list_item_vertical_divider_margin"
+ android:background="?android:attr/dividerVertical"/>
+ <!-- The secondary action button; either play voicemail or call details. -->
+ <ImageButton
+ android:id="@+id/secondary_action_icon"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingStart="@dimen/call_log_inner_margin"
+ android:paddingTop="@dimen/call_log_inner_margin"
+ android:paddingBottom="@dimen/call_log_inner_margin"
+ android:paddingEnd="@dimen/call_log_inner_margin"
+ android:scaleType="center"
+ android:background="?android:attr/selectableItemBackground"
+ android:nextFocusLeft="@id/primary_action_view"
+ />
+ </LinearLayout>
+ </LinearLayout>
<TextView
android:id="@+id/call_log_header"
style="@style/ContactListSeparatorTextViewStyle"
diff --git a/res/layout/phone_favorite_regular_row_view.xml b/res/layout/phone_favorite_regular_row_view.xml
index 0d131f6..d046fdb 100644
--- a/res/layout/phone_favorite_regular_row_view.xml
+++ b/res/layout/phone_favorite_regular_row_view.xml
@@ -65,18 +65,6 @@
android:singleLine="true"
android:textColor="@color/dialtacts_secondary_text_color" />
</LinearLayout>
- <ImageView
- android:id="@+id/contact_favorite_star"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignRight="@id/contact_tile_quick"
- android:layout_alignEnd="@id/contact_tile_quick"
- android:layout_alignBottom="@id/contact_tile_quick"
- android:layout_marginRight="7dip"
- android:layout_marginEnd="7dip"
- android:layout_marginBottom="7dip"
- android:src="@drawable/star_thumbnail"
- android:visibility="gone" />
</RelativeLayout>
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index c4ad780..8562b36 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -85,26 +85,6 @@
android:nextFocusRight="@+id/contact_tile_secondary_button"
android:background="?android:attr/selectableItemBackground" />
- <ImageView
- android:id="@+id/contact_favorite_star"
- android:background="?android:attr/selectableItemBackground"
- android:layout_height="@dimen/contact_tile_info_button_height_and_width"
- android:layout_width="@dimen/contact_tile_info_button_height_and_width"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingStart="2dp"
- android:paddingEnd="2dp"
- android:paddingTop="2dp"
- android:paddingBottom="2dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentEnd="true"
- android:src="@drawable/star_thumbnail"
- android:scaleType="center"
- android:contentDescription="@string/description_view_contact_detail"
- android:visibility="gone" />
-
-
<ImageButton
android:id="@id/contact_tile_secondary_button"
android:src="@drawable/overflow_thumbnail"
diff --git a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
index e855c88..181d602 100644
--- a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java
@@ -62,24 +62,12 @@
public void loadFromContact(ContactEntry entry) {
super.loadFromContact(entry);
if (entry != null) {
- final boolean contactIsFavorite = entry.isFavorite;
- mSecondaryButton.setVisibility(contactIsFavorite ? GONE : VISIBLE);
-
- if (contactIsFavorite) {
- mStarView.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- launchQuickContact();
- }
- });
- } else {
- mSecondaryButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- launchQuickContact();
- }
- });
- }
+ mSecondaryButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ launchQuickContact();
+ }
+ });
}
}
}
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index ecf5616..9d7dd5e 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -60,8 +60,6 @@
private View mUndoRemovalButton;
/** The view that holds the list view row. */
protected ContactTileRow mParentRow;
- /** The view that indicates whether the contact is a favorate. */
- protected ImageView mStarView;
/** Users' most frequent phone number. */
private String mPhoneNumberString;
@@ -89,7 +87,6 @@
mRemovalDialogue = findViewById(com.android.dialer.R.id.favorite_remove_dialogue);
mUndoRemovalButton = findViewById(com.android.dialer.R.id
.favorite_remove_undo_button);
- mStarView = (ImageView) findViewById(com.android.dialer.R.id.contact_favorite_star);
mUndoRemovalButton.setOnClickListener(new OnClickListener() {
@Override
@@ -127,7 +124,6 @@
// Grab the phone-number to call directly... see {@link onClick()}
mPhoneNumberString = entry.phoneNumber;
- mStarView.setVisibility(entry.isFavorite ? VISIBLE : GONE);
// If this is a blank entry, don't show anything.
// TODO krelease:Just hide the view for now. For this to truly look like an empty row
// the entire ContactTileRow needs to be hidden.