Add a View Source activity. https://redmine.stoutner.com/issues/64
[PrivacyBrowser.git] / app / src / main / java / com / stoutner / privacybrowser / activities / AboutActivity.java
index 8244774e30240a27b87a90865be1b6f278350915..0f6df3dfad5b166ab4b2eddf699664039b0a964e 100644 (file)
@@ -45,28 +45,24 @@ public class AboutActivity extends AppCompatActivity {
         // Run the default commands.
         super.onCreate(savedInstanceState);
 
         // Run the default commands.
         super.onCreate(savedInstanceState);
 
-        // Set the content view according to the theme.
-        if (MainWebViewActivity.darkTheme) {
-            setContentView(R.layout.about_coordinatorlayout_dark);
-        } else {
-            setContentView(R.layout.about_coordinatorlayout_light);
-        }
+        // Set the content view.
+        setContentView(R.layout.about_coordinatorlayout);
 
 
-        // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
-        Toolbar aboutAppBar = (Toolbar) findViewById(R.id.about_toolbar);
+        // `SupportActionBar` from `android.support.v7.app.ActionBar` must be used until the minimum API is >= 21.
+        Toolbar aboutAppBar = findViewById(R.id.about_toolbar);
         setSupportActionBar(aboutAppBar);
 
         setSupportActionBar(aboutAppBar);
 
-        // Display the home arrow on supportAppBar.
+        // Display the home arrow on `supportAppBar`.
         final ActionBar appBar = getSupportActionBar();
         final ActionBar appBar = getSupportActionBar();
-        assert appBar != null;// This assert removes the incorrect warning in Android Studio on the following line that appBar might be null.
+        assert appBar != null;  // This assert removes the incorrect warning in Android Studio on the following line that appBar might be null.
         appBar.setDisplayHomeAsUpEnabled(true);
 
         //  Setup the ViewPager.
         appBar.setDisplayHomeAsUpEnabled(true);
 
         //  Setup the ViewPager.
-        ViewPager aboutViewPager = (ViewPager) findViewById(R.id.about_viewpager);
+        ViewPager aboutViewPager = findViewById(R.id.about_viewpager);
         aboutViewPager.setAdapter(new aboutPagerAdapter(getSupportFragmentManager()));
 
         // Setup the TabLayout and connect it to the ViewPager.
         aboutViewPager.setAdapter(new aboutPagerAdapter(getSupportFragmentManager()));
 
         // Setup the TabLayout and connect it to the ViewPager.
-        TabLayout aboutTabLayout = (TabLayout) findViewById(R.id.about_tablayout);
+        TabLayout aboutTabLayout = findViewById(R.id.about_tablayout);
         aboutTabLayout.setupWithViewPager(aboutViewPager);
     }
 
         aboutTabLayout.setupWithViewPager(aboutViewPager);
     }