X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FAboutActivity.java;h=0f6df3dfad5b166ab4b2eddf699664039b0a964e;hb=ba22901e9774cfdc652c1c718ec921b8d647d4e8;hp=2251736b0ea7e95e720b9fd4ae0d5c9008e52d32;hpb=f82135d919d64d4909c37c79a18e14ceba802579;p=PrivacyBrowserAndroid.git 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 2251736b..0f6df3df 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java @@ -35,24 +35,34 @@ import com.stoutner.privacybrowser.R; public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { + // Set the theme. + if (MainWebViewActivity.darkTheme) { + setTheme(R.style.PrivacyBrowserDark_SecondaryActivity); + } else { + setTheme(R.style.PrivacyBrowserLight_SecondaryActivity); + } + + // Run the default commands. super.onCreate(savedInstanceState); + + // 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); - // Display the home arrow on supportAppBar. + // Display the home arrow on `supportAppBar`. 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. - 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. - TabLayout aboutTabLayout = (TabLayout) findViewById(R.id.about_tablayout); + TabLayout aboutTabLayout = findViewById(R.id.about_tablayout); aboutTabLayout.setupWithViewPager(aboutViewPager); }