mirror of
https://github.com/LucasVbr/OutilCuisson.git
synced 2026-05-14 09:05:32 +00:00
Modif template
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user