private void addIconTab(final int position, int resId) {

    ImageButton tab = new ImageButton(getContext());
    tab.setImageResource(resId);

    addTab(position, tab);
  }
  private void addTextTab(final int position, String title) {

    TextView tab = new TextView(getContext());
    tab.setText(title);
    tab.setGravity(Gravity.CENTER);
    tab.setSingleLine();
    addTab(position, tab);
  }
예제 #3
0
 private void addCustomTab(final int position, String title) {
   CustomTabView tab = new CustomTabView(getContext());
   tab.getTabItemTxt().setText(title);
   if (position == 0) tab.getTabItemTxt().setSelected(true);
   addTab(position, tab);
 }