@Override
        protected void onLayout(boolean changed, int l, int t, int r, int b) {
            int centerDiffX = mMarker.getMeasuredWidth() / 2;
            int offset = (mOffset - centerDiffX);
            mMarker.layout(offset, 0, offset + mMarker.getMeasuredWidth(), mMarker.getMeasuredHeight());
        }
Small FrameLayout class to hold and move the bubble around when requested
I wanted to use the {@link BalloonMarker} directly
but doing so would make some things harder to implement
(like moving the marker around, having the Marker's outline to work, etc)
caprice/ui/src/main/java/net/qiujuer/genius/ui/widget/popup/PopupIndicator.java