summaryrefslogtreecommitdiff
path: root/app/src/main/java/foundation
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/foundation')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt4
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/common/ToolbarFragment.kt5
2 files changed, 5 insertions, 4 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt
index 0a9d102..52197cd 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt
@@ -17,12 +17,12 @@
package foundation.e.privacycentralapp.common
-import android.widget.Toolbar
import androidx.annotation.LayoutRes
+import com.google.android.material.appbar.MaterialToolbar
abstract class NavToolbarFragment(@LayoutRes contentLayoutId: Int) : ToolbarFragment(contentLayoutId) {
- override fun setupToolbar(toolbar: Toolbar) {
+ override fun setupToolbar(toolbar: MaterialToolbar) {
super.setupToolbar(toolbar)
toolbar.apply {
setNavigationIcon(lineageos.platform.R.drawable.ic_back)
diff --git a/app/src/main/java/foundation/e/privacycentralapp/common/ToolbarFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/common/ToolbarFragment.kt
index c316340..f156e09 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/common/ToolbarFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/common/ToolbarFragment.kt
@@ -19,9 +19,9 @@ package foundation.e.privacycentralapp.common
import android.os.Bundle
import android.view.View
-import android.widget.Toolbar
import androidx.annotation.LayoutRes
import androidx.fragment.app.Fragment
+import com.google.android.material.appbar.MaterialToolbar
import foundation.e.privacycentralapp.R
abstract class ToolbarFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayoutId) {
@@ -33,10 +33,11 @@ abstract class ToolbarFragment(@LayoutRes contentLayoutId: Int) : Fragment(conte
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
+
setupToolbar(view.findViewById(R.id.toolbar))
}
- open fun setupToolbar(toolbar: Toolbar) {
+ open fun setupToolbar(toolbar: MaterialToolbar) {
toolbar.title = getTitle()
}
}