Commit c013e6d0 authored by David Trainor's avatar David Trainor Committed by Commit Bot

Hide the update menu item summary if empty

The update app menu item has an odd alignment when there is no summary
to show.  This is because the summary is still taking vertical space,
which leaves a larger than normal gap between the update app menu item
and the next menu item.  This CL makes the summary visibility GONE when
there is no text to show, which removes it from layout calculations.

Bug: 922711
Change-Id: I34d62ff1ba0cdf68a8b53df3b75a9e91a21f55df
Reviewed-on: https://chromium-review.googlesource.com/c/1479301Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634550}
parent 09017c49
...@@ -212,8 +212,10 @@ class AppMenuAdapter extends BaseAdapter { ...@@ -212,8 +212,10 @@ class AppMenuAdapter extends BaseAdapter {
if (!TextUtils.isEmpty(itemState.summary)) { if (!TextUtils.isEmpty(itemState.summary)) {
holder.summary.setText(itemState.summary); holder.summary.setText(itemState.summary);
holder.summary.setVisibility(View.VISIBLE);
} else { } else {
holder.summary.setText(""); holder.summary.setText("");
holder.summary.setVisibility(View.GONE);
} }
holder.image.setImageResource(itemState.icon); holder.image.setImageResource(itemState.icon);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment