X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FAboutActivity.kt;h=bd5c34e0caa34a98748c151f1635b4d92f0cdc05;hp=72e50c4c827404da022ff8eca10830afd63395f8;hb=c51155ed36754975d2b8673e37e58df6201702b8;hpb=5f1a770884ec933217ba377e92e0e7466572e92d diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.kt b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.kt index 72e50c4c..bd5c34e0 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.kt @@ -32,12 +32,9 @@ import com.google.android.material.tabs.TabLayout import com.stoutner.privacybrowser.R import com.stoutner.privacybrowser.adapters.AboutPagerAdapter -class AboutActivity : AppCompatActivity() { - companion object { - // Define the companion object constants. These can be move to being public constants once MainWebViewActivity has been converted to Kotlin. - const val BLOCKLIST_VERSIONS = "blocklist_versions" - } +const val FILTERLIST_VERSIONS = "filterlist_versions" +class AboutActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { // Get a handle for the shared preferences. val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this) @@ -57,15 +54,14 @@ class AboutActivity : AppCompatActivity() { // Get the intent that launched the activity. val launchingIntent = intent - // Store the blocklist versions. - val blocklistVersions = launchingIntent.getStringArrayExtra(BLOCKLIST_VERSIONS)!! + // Get the filter list versions. + val filterListVersions = launchingIntent.getStringArrayExtra(FILTERLIST_VERSIONS)!! // Set the content view. - if (bottomAppBar) { + if (bottomAppBar) setContentView(R.layout.about_bottom_appbar) - } else { + else setContentView(R.layout.about_top_appbar) - } // Get handles for the views. val toolbar = findViewById(R.id.about_toolbar) @@ -82,7 +78,7 @@ class AboutActivity : AppCompatActivity() { actionBar.setDisplayHomeAsUpEnabled(true) // Initialize the about pager adapter. - val aboutPagerAdapter = AboutPagerAdapter(supportFragmentManager, applicationContext, blocklistVersions) + val aboutPagerAdapter = AboutPagerAdapter(supportFragmentManager, applicationContext, filterListVersions) // Set the view pager adapter. aboutViewPager.adapter = aboutPagerAdapter