It looks like you are already creating a custom view, so you can override onLayout() and call View#layout(int left, int top, int right, int bottom) on the desired layout.
final int left = 0; final int top = getHeight() - bottomBar.getHeight(); final int right = left + bottomBar.getWidth(); final int bottom = top + bottomBar.getHeight(); bottomBar.layout(left, top, right, bottom);
source share