1
0
Fork 0
fenix/app/src/main/java/org/mozilla/fenix/trackingprotection/TrackingProtectionBlockingF...

36 lines
1.4 KiB
Kotlin
Raw Normal View History

2019-09-10 22:29:21 +02:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.trackingprotection
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
2019-10-06 19:57:41 +02:00
import androidx.core.view.isVisible
2019-09-10 22:29:21 +02:00
import androidx.fragment.app.Fragment
2019-10-06 19:57:41 +02:00
import androidx.navigation.fragment.navArgs
2019-09-10 22:29:21 +02:00
import kotlinx.android.synthetic.main.fragment_tracking_protection_blocking.*
import org.mozilla.fenix.R
2019-10-06 19:57:41 +02:00
class TrackingProtectionBlockingFragment : Fragment(R.layout.fragment_tracking_protection_blocking) {
2019-09-10 22:29:21 +02:00
2019-10-06 19:57:41 +02:00
private val args: TrackingProtectionBlockingFragmentArgs by navArgs()
2019-09-10 22:29:21 +02:00
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
category_fingerprinters.isVisible = args.strictMode
2019-10-06 19:57:41 +02:00
category_tracking_content.isVisible = args.strictMode
2019-09-10 22:29:21 +02:00
}
override fun onResume() {
super.onResume()
(activity as AppCompatActivity).title =
getString(
2019-10-06 19:57:41 +02:00
if (args.strictMode) R.string.preference_enhanced_tracking_protection_strict else
2019-09-10 22:29:21 +02:00
R.string.preference_enhanced_tracking_protection_standard
)
(activity as AppCompatActivity).supportActionBar?.show()
}
}