diff --git a/library/ui-styles/src/debug/java/im/vector/lib/ui/styles/debug/DebugMaterialThemeActivity.kt b/library/ui-styles/src/debug/java/im/vector/lib/ui/styles/debug/DebugMaterialThemeActivity.kt index f25303c17c..7175577247 100644 --- a/library/ui-styles/src/debug/java/im/vector/lib/ui/styles/debug/DebugMaterialThemeActivity.kt +++ b/library/ui-styles/src/debug/java/im/vector/lib/ui/styles/debug/DebugMaterialThemeActivity.kt @@ -50,11 +50,15 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() { } views.debugShowDialog.setOnClickListener { - showTestDialog(false) + showTestDialog(0) } views.debugShowDialogDestructive.setOnClickListener { - showTestDialog(true) + showTestDialog(R.style.ThemeOverlay_Vector_MaterialAlertDialog_Destructive) + } + + views.debugShowDialogNegativeDestructive.setOnClickListener { + showTestDialog(R.style.ThemeOverlay_Vector_MaterialAlertDialog_NegativeDestructive) } views.debugShowBottomSheet.setOnClickListener { @@ -62,8 +66,8 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() { } } - private fun showTestDialog(destructive: Boolean) { - MaterialAlertDialogBuilder(this, if (destructive) R.style.ThemeOverlay_Vector_MaterialAlertDialog_Destructive else 0) + private fun showTestDialog(theme: Int) { + MaterialAlertDialogBuilder(this, theme) .setTitle("Dialog title") .setMessage("Dialog content") .setIcon(R.drawable.ic_debug_icon) diff --git a/library/ui-styles/src/debug/res/layout/activity_debug_material_theme.xml b/library/ui-styles/src/debug/res/layout/activity_debug_material_theme.xml index 356bf9aaf0..e6d4404f2d 100644 --- a/library/ui-styles/src/debug/res/layout/activity_debug_material_theme.xml +++ b/library/ui-styles/src/debug/res/layout/activity_debug_material_theme.xml @@ -459,6 +459,13 @@ android:layout_gravity="center_horizontal" android:text="Show Dialog Destructive" /> +