private void updateLayoutParamsForPosiion(
     View anchor, WindowManager.LayoutParams p, int yOffset) {
   measureFloater();
   int measuredHeight = mPopupView.getMeasuredHeight();
   int paddingBottom = mPopupView.mMarker.getPaddingBottom();
   anchor.getLocationInWindow(mDrawingLocation);
   p.x = 0;
   p.y = mDrawingLocation[1] - measuredHeight + yOffset + paddingBottom;
   p.width = screenSize.x;
   p.height = measuredHeight;
 }
 /**
  * We want the Floater to be full-width because the contents will be moved from side to side. We
  * may/should change this in the future to use just the PARENT View width and/or pass it in the
  * constructor
  */
 private void measureFloater() {
   int specWidth = View.MeasureSpec.makeMeasureSpec(screenSize.x, View.MeasureSpec.EXACTLY);
   int specHeight = View.MeasureSpec.makeMeasureSpec(screenSize.y, View.MeasureSpec.AT_MOST);
   mPopupView.measure(specWidth, specHeight);
 }
 private void translateViewIntoPosition(final int x) {
   mPopupView.setFloatOffset(x + mDrawingLocation[0]);
 }
 public void setColors(int startColor, int endColor) {
   mPopupView.setColors(startColor, endColor);
 }