summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-05-06 14:36:50 -0700
committerAndrew Lee <anwlee@google.com>2015-05-07 14:44:12 -0700
commit51c2bde72ee4674266ac464bea2aba72d217d75f (patch)
treeec4401aa894388658fe91a25a35de632a70ff9d0 /src
parentf4ea223170ab5aaf63562d7d46b08fd24664bdce (diff)
Update layouts for call log list item actions.
+ Add icons for actions. + Revise layouts to match new visual appearance. Call Log actions are now a linear layout with an icon and text. + Some style/redline tweaks. + Temporarily replaced animation logic with LinearLayout, to be revisited. Bug: 20433758 Change-Id: Ia13b6c9f583d673743488f2e93be5593a1fbf8dc
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemViewHolder.java39
-rw-r--r--src/com/android/dialer/calllog/CallTypeIconsView.java2
2 files changed, 9 insertions, 32 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index 365290077..2e12d9a0e 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -65,13 +65,13 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder {
/** The view containing call log item actions. Null until the ViewStub is inflated. */
public View actionsView;
/** The "video call" action button - assigned only when the action section is expanded. */
- public TextView videoCallButtonView;
+ public View videoCallButtonView;
/** The "voicemail" action button - assigned only when the action section is expanded. */
- public TextView voicemailButtonView;
+ public View voicemailButtonView;
/** The "details" action button - assigned only when the action section is expanded. */
- public TextView detailsButtonView;
+ public View detailsButtonView;
/** The "report" action button. */
- public TextView reportButtonView;
+ public View reportButtonView;
/**
* The row Id for the first call associated with the call log entry. Used as a key for the
@@ -217,19 +217,19 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder {
}
if (videoCallButtonView == null) {
- videoCallButtonView = (TextView) actionsView.findViewById(R.id.video_call_action);
+ videoCallButtonView = actionsView.findViewById(R.id.video_call_action);
}
if (voicemailButtonView == null) {
- voicemailButtonView = (TextView) actionsView.findViewById(R.id.voicemail_action);
+ voicemailButtonView = actionsView.findViewById(R.id.voicemail_action);
}
if (detailsButtonView == null) {
- detailsButtonView = (TextView) actionsView.findViewById(R.id.details_action);
+ detailsButtonView = actionsView.findViewById(R.id.details_action);
}
if (reportButtonView == null) {
- reportButtonView = (TextView) actionsView.findViewById(R.id.report_action);
+ reportButtonView = actionsView.findViewById(R.id.report_action);
reportButtonView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -341,29 +341,6 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder {
actionsView.setVisibility(View.GONE);
}
}
-
- if (actionsView != null) {
- final ViewTreeObserver observer = callLogEntryView.getViewTreeObserver();
- observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- ViewTreeObserver vto = observer;
- if (!vto.isAlive()) {
- vto = actionsView.getViewTreeObserver();
- }
- vto.removeOnPreDrawListener(this);
-
- // TODO: Animate, instead of immediately resizing.
- int currentHeight = primaryActionView.getHeight();
- int actionsHeight = actionsView.getVisibility() == View.VISIBLE
- ? actionsView.getHeight() : 0;
- callLogEntryView.getLayoutParams().height = currentHeight + actionsHeight;
- callLogEntryView.requestLayout();
-
- return false;
- }
- });
- }
}
public void expandVoicemailTranscriptionView(boolean isExpanded) {
diff --git a/src/com/android/dialer/calllog/CallTypeIconsView.java b/src/com/android/dialer/calllog/CallTypeIconsView.java
index ef729ae39..31d4f4b0e 100644
--- a/src/com/android/dialer/calllog/CallTypeIconsView.java
+++ b/src/com/android/dialer/calllog/CallTypeIconsView.java
@@ -208,7 +208,7 @@ public class CallTypeIconsView extends View {
// We want the video call icon to be the same height as the call arrows, while keeping
// the same width aspect ratio.
Bitmap videoIcon = BitmapFactory.decodeResource(context.getResources(),
- R.drawable.ic_videocam_wht_24dp);
+ R.drawable.ic_videocam_24dp);
int scaledHeight = missed.getIntrinsicHeight();
int scaledWidth = (int) ((float) videoIcon.getWidth() *
((float) missed.getIntrinsicHeight() /