diff options
author | Andrew Lee <anwlee@google.com> | 2015-05-06 14:36:50 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-05-07 14:44:12 -0700 |
commit | 51c2bde72ee4674266ac464bea2aba72d217d75f (patch) | |
tree | ec4401aa894388658fe91a25a35de632a70ff9d0 /src/com/android/dialer/calllog/CallLogListItemViewHolder.java | |
parent | f4ea223170ab5aaf63562d7d46b08fd24664bdce (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/com/android/dialer/calllog/CallLogListItemViewHolder.java')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 39 |
1 files changed, 8 insertions, 31 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) { |