From 6812f9d2029354ced750fa09d7d3e972bb7b25bb Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Sat, 1 Feb 2020 16:55:22 +0100 Subject: [PATCH] Updated su request dialog to match overall app theme --- app/src/main/res/layout/activity_request.xml | 218 ++++++++++--------- app/src/main/res/layout/item_spinner.xml | 2 + app/src/main/res/values/styles_md2.xml | 1 + 3 files changed, 117 insertions(+), 104 deletions(-) diff --git a/app/src/main/res/layout/activity_request.xml b/app/src/main/res/layout/activity_request.xml index 6d0ed9652..9f51c3b98 100644 --- a/app/src/main/res/layout/activity_request.xml +++ b/app/src/main/res/layout/activity_request.xml @@ -11,132 +11,142 @@ - - - + android:layout_gravity="center"> + android:minWidth="350dp" + android:orientation="vertical"> - + + android:layout_gravity="center_horizontal" + android:layout_marginTop="@dimen/l_50" + android:layout_marginBottom="@dimen/l_50" + android:orientation="horizontal" + android:paddingStart="10dp" + android:paddingEnd="10dp"> - + + + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:gravity="center_vertical" + android:orientation="vertical"> - + + + + - - - - - - - - + android:layout_gravity="center_horizontal" + android:adapter="@{viewModel.adapter}" + android:selection="@={viewModel.selectedItemPosition}" /> - + android:layout_gravity="center_horizontal" + android:layout_margin="@dimen/l1" + android:gravity="center" + android:text="@{viewModel.warningText}" + android:textAppearance="@style/AppearanceFoundation.Body" + android:textColor="?colorError" + android:textStyle="bold" + tools:text="@string/su_warning" /> + + + + + + + + - + diff --git a/app/src/main/res/layout/item_spinner.xml b/app/src/main/res/layout/item_spinner.xml index 3a2a71869..bfd176459 100644 --- a/app/src/main/res/layout/item_spinner.xml +++ b/app/src/main/res/layout/item_spinner.xml @@ -16,6 +16,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" + android:background="?colorSurfaceVariant" + android:textAppearance="@style/AppearanceFoundation.Caption" android:gravity="center_vertical" android:minHeight="?attr/listPreferredItemHeightSmall" android:singleLine="true" diff --git a/app/src/main/res/values/styles_md2.xml b/app/src/main/res/values/styles_md2.xml index d86b3390e..b502f095a 100644 --- a/app/src/main/res/values/styles_md2.xml +++ b/app/src/main/res/values/styles_md2.xml @@ -41,6 +41,7 @@ \ No newline at end of file