Java Code Examples for android.support.design.widget.TabLayout#OnTabSelectedListener

The following examples show how to use android.support.design.widget.TabLayout#OnTabSelectedListener . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java    From Expense-Tracker-App with MIT License 5 votes vote down vote up
@Override
public void setTabs(List<String> tabList, final TabLayout.OnTabSelectedListener onTabSelectedListener) {
    mainTabLayout.removeAllTabs();
    mainTabLayout.setVisibility(View.VISIBLE);
    mainTabLayout.setOnTabSelectedListener(onTabSelectedListener);
    for (String tab : tabList) {
        mainTabLayout.addTab(mainTabLayout.newTab().setText(tab).setTag(tab));
    }
}
 
Example 2
Source File: EnhanceTabLayout.java    From MaoWanAndoidClient with Apache License 2.0 4 votes vote down vote up
public void addOnTabSelectedListener (TabLayout.OnTabSelectedListener onTabSelectedListener){
    mTabLayout.addOnTabSelectedListener(onTabSelectedListener);
}
 
Example 3
Source File: IMainActivityListener.java    From Expense-Tracker-App with MIT License votes vote down vote up
void setTabs(List<String> tabList, TabLayout.OnTabSelectedListener onTabSelectedListener);