X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fadapters%2FPinnedMismatchPagerAdapter.kt;h=6c9ea8bbc11fb1253eefaa7441ec6de5efd29de3;hb=dc36dea65a4eb37496fb1ecbbd9f8e1906f50216;hp=6cf5485b32f86dd28ffe4cf8270f70b402330853;hpb=48ae68b846bb5bb035e0d86659e4736b6db6f12d;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt b/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt index 6cf5485b..6c9ea8bb 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2021-2022 Soren Stoutner . + * Copyright © 2021-2023 Soren Stoutner . * * This file is part of Privacy Browser Android . * @@ -63,10 +63,10 @@ class PinnedMismatchPagerAdapter(private val context: Context, private val layou // Setup each tab. override fun instantiateItem(container: ViewGroup, tabNumber: Int): Any { // Get the current position of this WebView fragment. - val webViewPosition = MainWebViewActivity.webViewPagerAdapter.getPositionForId(webViewFragmentId) + val webViewPosition = MainWebViewActivity.webViewPagerAdapter!!.getPositionForId(webViewFragmentId) // Get the WebView tab fragment. - val webViewTabFragment = MainWebViewActivity.webViewPagerAdapter.getPageFragment(webViewPosition) + val webViewTabFragment = MainWebViewActivity.webViewPagerAdapter!!.getPageFragment(webViewPosition) // Get the WebView fragment view. val webViewFragmentView = webViewTabFragment.requireView() @@ -90,13 +90,13 @@ class PinnedMismatchPagerAdapter(private val context: Context, private val layou val endDateTextView = tabLayout.findViewById(R.id.end_date) // Setup the labels. - val domainNameLabel = context.getString(R.string.domain_label) + " " - val ipAddressesLabel = context.getString(R.string.ip_addresses) + " " - val cNameLabel = context.getString(R.string.common_name) + " " - val oNameLabel = context.getString(R.string.organization) + " " - val uNameLabel = context.getString(R.string.organizational_unit) + " " - val startDateLabel = context.getString(R.string.start_date) + " " - val endDateLabel = context.getString(R.string.end_date) + " " + val domainNameLabel = context.getString(R.string.domain_label) + val ipAddressesLabel = context.getString(R.string.ip_addresses) + val cNameLabel = context.getString(R.string.common_name) + val oNameLabel = context.getString(R.string.organization) + val uNameLabel = context.getString(R.string.organizational_unit) + val startDateLabel = context.getString(R.string.start_date) + val endDateLabel = context.getString(R.string.end_date) // Convert the URL to a URI. val currentUri = Uri.parse(nestedScrollWebView.url)