From 3902641775cb128265f6273819cf9c76dcb2c419 Mon Sep 17 00:00:00 2001 From: Norbel Ambanumben Date: Fri, 3 Nov 2023 15:07:06 +0100 Subject: [PATCH] Modified Menu and toolbar views for `RunTestsActivity` with proper styling --- app/src/main/AndroidManifest.xml | 3 ++- .../activity/runtests/RunTestsActivity.kt | 23 +++++++++++++++++-- .../main/res/layout/activity_run_tests.xml | 19 +++++++++++---- app/src/main/res/menu/close.xml | 10 ++++++++ 4 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 app/src/main/res/menu/close.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7f53c91ba..0b4b5e9f5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -42,7 +42,8 @@ android:label="Run tests" android:name=".activity.runtests.RunTestsActivity" android:parentActivityName=".activity.MainActivity" - android:exported="false"/> + android:exported="false" + android:theme="@style/Theme.MaterialComponents.Light.DarkActionBar.App.NoActionBar"/> { + finish() + true + } + + else -> super.onOptionsItemSelected(item) + } + } + private fun onMenuItemClickListener(menuItem: MenuItem): Boolean { return when (menuItem.itemId) { R.id.runButton -> { diff --git a/app/src/main/res/layout/activity_run_tests.xml b/app/src/main/res/layout/activity_run_tests.xml index 309bf0041..10dcc4d38 100644 --- a/app/src/main/res/layout/activity_run_tests.xml +++ b/app/src/main/res/layout/activity_run_tests.xml @@ -6,14 +6,25 @@ android:layout_height="match_parent" tools:context=".activity.runtests.RunTestsActivity"> + + + app:layout_constraintEnd_toEndOf="parent">