message: Ran measure and ayout from requestLayout
diff: @@ -22,6 +22,7 @@ import java.util.List;
  public class TabBarView extends ViewPager {
  boolean swipeable = true;
  + private boolean layoutRequested = false;
  public TabBarView(Context context) {
  super(context);
  @@ -33,7 +34,6 @@ public class TabBarView extends ViewPager {
  protected void onAttachedToWindow() {
  super.onAttachedToWindow();
  requestLayout();
  - post(measureAndLayout);
  if (getTabView() != null)
  getTabView().setupWithViewPager(this);
  populateTabs();
  @@ -61,9 +61,19 @@ public class TabBarView extends ViewPager {
  return null;
  }
  + @Override
  + public void requestLayout() {
  + super.requestLayout();
  + if (!layoutRequested) {
  + layoutRequested = true;
  + post(measureAndLayout);
  + }
  + }
  +
  private final Runnable measureAndLayout = new Runnable() {
  @Override
  public void run() {
  + layoutRequested = false;
  measure(
  MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY),
  MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY));
  @@ -156,7 +166,6 @@ public class TabBarView extends ViewPager {
  public Object instantiateItem(@NonNull ViewGroup container, int position) {
  TabBarItemView tab = tabs.get(position);
  container.addView(tab.content.get(0), 0);
  - post(measureAndLayout);
  return tab.content.get(0);
  }
  