Add a debug button to test crash of the app

This commit is contained in:
Benoit Marty 2019-07-11 10:36:59 +02:00
parent ddf4a81905
commit c9fe1adb77
2 changed files with 12 additions and 0 deletions

View File

@ -133,5 +133,10 @@ class DebugMenuActivity : VectorBaseActivity() {
startActivity(Intent(this, DebugMaterialThemeDarkActivity::class.java))
}

@OnClick(R.id.debug_test_crash)
fun testCrash() {
throw RuntimeException("Application crashed from user demand")
}

}


View File

@ -47,6 +47,13 @@
android:layout_height="wrap_content"
android:text="Test Material theme Dark" />

<com.google.android.material.button.MaterialButton
android:id="@+id/debug_test_crash"
style="@style/VectorButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Crash the app" />

</LinearLayout>

</ScrollView>