X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FAboutActivity.java;h=3508b7521f3de43efec13ac42c3ca111abaabaa8;hp=d84b9c49f1b536e66ede32b67216ce7e142ed6a1;hb=84989e138cb593d5a2f70be848db4889aaa8da88;hpb=dcd456906d7611bfdb35b0421b03405947b3edf3 diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java index d84b9c49..3508b752 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java @@ -56,8 +56,12 @@ public class AboutActivity extends AppCompatActivity { // Set the content view. setContentView(R.layout.about_coordinatorlayout); - // `SupportActionBar` from `android.support.v7.app.ActionBar` must be used until the minimum API is >= 21. + // Get handles for the views. Toolbar toolbar = findViewById(R.id.about_toolbar); + TabLayout aboutTabLayout = findViewById(R.id.about_tablayout); + ViewPager aboutViewPager = findViewById(R.id.about_viewpager); + + // Set the action bar. `SupportActionBar` must be used until the minimum API is >= 21. setSupportActionBar(toolbar); // Get a handle for the action bar. @@ -70,16 +74,14 @@ public class AboutActivity extends AppCompatActivity { actionBar.setDisplayHomeAsUpEnabled(true); // Setup the ViewPager. - ViewPager aboutViewPager = findViewById(R.id.about_viewpager); - aboutViewPager.setAdapter(new aboutPagerAdapter(getSupportFragmentManager())); + aboutViewPager.setAdapter(new AboutPagerAdapter(getSupportFragmentManager())); - // Setup the TabLayout and connect it to the ViewPager. - TabLayout aboutTabLayout = findViewById(R.id.about_tablayout); + // Connect the tab layout to the view pager. aboutTabLayout.setupWithViewPager(aboutViewPager); } - private class aboutPagerAdapter extends FragmentPagerAdapter { - private aboutPagerAdapter(FragmentManager fragmentManager) { + private class AboutPagerAdapter extends FragmentPagerAdapter { + private AboutPagerAdapter(FragmentManager fragmentManager) { // Run the default commands. super(fragmentManager); }