Code example for TabWidget

Methods: getChildAt

  int calcXPos(TabWidget tabWidget, int position, float positionOffset, HorizontalScrollView scroller) {
    final View current = tabWidget.getChildAt(position);
    final int xPos = (int)(current.getLeft() + current.getWidth()*positionOffset);
    return xPos;
  public class TabHostAdapter extends PagerAdapter implements OnPageChangeListener, OnTabChangeListener {
    private List<Interpolator> fTabs = new ArrayList<Interpolator>();
    private final Context fContext;
    public TabHostAdapter(Context c) {
      fContext = c;
Connect your IDE to all the code out there  Get Codota for Java