Hide pointer on create

Pointer shows up at left edge of expanded view before
snapping to correct position. This change hides the pointer initially,
and shows it after it points to the selected bubble.

Bug: 132907741
Test: manual
Change-Id: I7c9282b3f4c46afee109cae926a6e3970458d399
This commit is contained in:
Lyn Han
2019-05-20 16:08:48 -07:00
parent 83518d9436
commit f74ba67c22

View File

@@ -176,6 +176,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList
mPointerDrawable = new ShapeDrawable(TriangleShape.create(
mPointerWidth, mPointerHeight, false /* pointUp */));
mPointerView.setBackground(mPointerDrawable);
mPointerView.setVisibility(GONE);
mSettingsIconHeight = getContext().getResources().getDimensionPixelSize(
R.dimen.bubble_expanded_header_height);
@@ -444,6 +445,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList
// Adjust for the pointer size
x -= (mPointerView.getWidth() / 2f);
mPointerView.setTranslationX(x);
mPointerView.setVisibility(VISIBLE);
}
/**