summaryrefslogtreecommitdiff
path: root/java/com/android/dialer
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2017-07-11 17:23:21 -0700
committerEric Erfanian <erfanian@google.com>2017-07-13 17:20:41 +0000
commitb4b4b08f2232c686f93e899bacdbfd8600ff78e4 (patch)
treec0da4d86d4cefd1f285e146748d6612240158da7 /java/com/android/dialer
parentf715de6b08e428ba45d1076e4133fe9b7f6b9a7d (diff)
Fix Call button text alignment in expanded call log item
The Call button may have two lines of text. We were not properly setting the second to GONE in all cases. Note: We don't need to require Google Dialer being the default Dialer for the Duo integration to work. I added this check so removing it doesn't go against any previous well-considered decision. It also enables the Espresso test work without needing a flag to override. Before: https://screenshot.googleplex.com/3YXaZdbQk7k After: https://drive.google.com/open?id=0B7uuA4cyYX0xNThETTJWdTVQQWM Bug: 63062360 Test: GoogleDialtactsActivityTest PiperOrigin-RevId: 161606497 Change-Id: I7526a4fc60b84906cc04563b635eaad9f348415e
Diffstat (limited to 'java/com/android/dialer')
-rw-r--r--java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java9
-rw-r--r--java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml3
2 files changed, 6 insertions, 6 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
index 884d07d50..6b97bd694 100644
--- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
+++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
@@ -581,12 +581,16 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
return;
}
+ TextView callTypeOrLocationView =
+ ((TextView) callButtonView.findViewById(R.id.call_type_or_location_text));
+
if (canPlaceCallToNumber) {
// Set up the call button but hide it by default (the primary action is to call so it is
// redundant). We then set it to be visible when appropriate below. This saves us having to
// remember to set it to GONE in multiple places.
callButtonView.setTag(IntentProvider.getReturnCallIntentProvider(number));
callButtonView.setVisibility(View.GONE);
+ callTypeOrLocationView.setVisibility(View.GONE);
}
if (!TextUtils.isEmpty(voicemailUri) && canPlaceCallToNumber) {
@@ -595,13 +599,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
TextUtils.expandTemplate(
mContext.getString(R.string.call_log_action_call),
nameOrNumber == null ? "" : nameOrNumber));
- TextView callTypeOrLocationView =
- ((TextView) callButtonView.findViewById(R.id.call_type_or_location_text));
+
if (callType == Calls.VOICEMAIL_TYPE && !TextUtils.isEmpty(callTypeOrLocation)) {
callTypeOrLocationView.setText(callTypeOrLocation);
callTypeOrLocationView.setVisibility(View.VISIBLE);
- } else {
- callTypeOrLocationView.setVisibility(View.GONE);
}
callButtonView.setVisibility(View.VISIBLE);
}
diff --git a/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml b/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml
index 504638348..ec9e5a00e 100644
--- a/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml
+++ b/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml
@@ -35,8 +35,7 @@
<LinearLayout
android:id="@+id/call_action"
- style="@style/CallLogActionStyle"
- android:paddingTop="@dimen/call_log_actions_top_padding">
+ style="@style/CallLogActionStyle">
<ImageView
style="@style/CallLogActionIconStyle"