From 0ccd8ba071c15656cafcebdd9788ddf39bcbb40c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 10 Jun 2021 15:36:26 +0200 Subject: [PATCH] Configure the toolbar in the debug activity --- .../debug/DebugMaterialThemeActivity.kt | 6 + .../layout/activity_test_material_theme.xml | 741 +++++++++--------- 2 files changed, 382 insertions(+), 365 deletions(-) diff --git a/vector/src/debug/java/im/vector/app/features/debug/DebugMaterialThemeActivity.kt b/vector/src/debug/java/im/vector/app/features/debug/DebugMaterialThemeActivity.kt index de6b981c02..3378740eea 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/DebugMaterialThemeActivity.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/DebugMaterialThemeActivity.kt @@ -33,6 +33,12 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() { val views = ActivityTestMaterialThemeBinding.inflate(layoutInflater) setContentView(views.root) + setSupportActionBar(views.debugToolbar) + supportActionBar?.let { + it.setDisplayShowHomeEnabled(true) + it.setDisplayHomeAsUpEnabled(true) + } + views.debugShowSnackbar.setOnClickListener { Snackbar.make(views.coordinatorLayout, "Snackbar!", Snackbar.LENGTH_SHORT) .setAction("Action") { } diff --git a/vector/src/debug/res/layout/activity_test_material_theme.xml b/vector/src/debug/res/layout/activity_test_material_theme.xml index 2ec23a4b31..c2baded7f2 100644 --- a/vector/src/debug/res/layout/activity_test_material_theme.xml +++ b/vector/src/debug/res/layout/activity_test_material_theme.xml @@ -8,437 +8,448 @@ tools:context=".features.debug.DebugMaterialThemeActivity" tools:ignore="HardcodedText"> - - + app:layout_constraintTop_toTopOf="parent" + app:subtitle="Toolbar Subtitle" + app:title="Toolbar Title" /> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:hint="OutlinedBox"> - + - + - + android:hint="OutlinedBox.Dense"> - + + + - - - + android:hint="FilledBox"> - + - + - + android:hint="FilledBox.Dense"> - + - - -