Modif template

This commit is contained in:
NonoL3Robot
2022-02-16 15:30:56 +01:00
parent 2df5db8c30
commit 7e08d0c71e
9 changed files with 4 additions and 37 deletions
@@ -33,14 +33,5 @@ public class MainActivity extends AppCompatActivity {
viewPager.setAdapter(sectionsPagerAdapter);
TabLayout tabs = binding.tabs;
tabs.setupWithViewPager(viewPager);
FloatingActionButton fab = binding.fab;
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
}
}
@@ -18,7 +18,7 @@ public class SectionsPagerAdapter extends FragmentPagerAdapter {
@StringRes
private static final int[] TAB_TITLES = new int[]{
R.string.tab_text_1, R.string.tab_text_2
R.string.tab_text_1, R.string.tab_text_2, R.string.tab_text_3
};
private final Context mContext;
@@ -42,7 +42,7 @@ public class SectionsPagerAdapter extends FragmentPagerAdapter {
@Override
public int getCount() {
// Show 2 total pages.
return 2;
// Show the total of pages
return TAB_TITLES.length;
}
}