From 7de3b1e2942a153e2a288c8ba8cfe25db8647366 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Thu, 8 Apr 2021 10:19:26 +0200 Subject: [PATCH] optimize bottom sheet layout and make it dark/light theme aware Signed-off-by: Andy Scherzinger --- app/src/main/res/drawable-night/ic_call.xml | 29 ++++++ app/src/main/res/drawable/ic_call.xml | 29 ++++++ app/src/main/res/layout/dialog_scope.xml | 106 +++++++++++--------- 3 files changed, 119 insertions(+), 45 deletions(-) create mode 100644 app/src/main/res/drawable-night/ic_call.xml create mode 100644 app/src/main/res/drawable/ic_call.xml diff --git a/app/src/main/res/drawable-night/ic_call.xml b/app/src/main/res/drawable-night/ic_call.xml new file mode 100644 index 000000000..bc827fa62 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_call.xml @@ -0,0 +1,29 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_call.xml b/app/src/main/res/drawable/ic_call.xml new file mode 100644 index 000000000..3dd2ef2d7 --- /dev/null +++ b/app/src/main/res/drawable/ic_call.xml @@ -0,0 +1,29 @@ + + + + + diff --git a/app/src/main/res/layout/dialog_scope.xml b/app/src/main/res/layout/dialog_scope.xml index 3fa9ab8c8..8ea9068b3 100644 --- a/app/src/main/res/layout/dialog_scope.xml +++ b/app/src/main/res/layout/dialog_scope.xml @@ -2,7 +2,9 @@ ~ Nextcloud Talk application ~ ~ @author Tobias Kaminsky + ~ @author Andy Scherzinger ~ Copyright (C) 2021 Tobias Kaminsky + ~ Copyright (C) 2021 Andy Scherzinger ~ ~ This program is free software: you can redistribute it and/or modify ~ it under the terms of the GNU General Public License as published by @@ -22,43 +24,51 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@color/bg_bottom_sheet" android:orientation="vertical" - android:paddingTop="8dp" - android:paddingBottom="8dp"> + android:paddingStart="@dimen/standard_padding" + android:paddingTop="@dimen/standard_half_padding" + android:paddingEnd="@dimen/standard_padding" + android:paddingBottom="@dimen/standard_half_padding"> + android:orientation="horizontal" + android:paddingTop="@dimen/standard_half_padding" + android:paddingBottom="@dimen/standard_half_padding"> + app:srcCompat="@drawable/ic_call" /> + android:text="@string/scope_private_description" + android:textColor="@color/textColorMaxContrast" + android:textSize="14sp" /> @@ -68,36 +78,38 @@ android:id="@+id/scope_local" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/standard_margin" - android:layout_marginTop="@dimen/standard_half_margin" - android:orientation="horizontal"> + android:orientation="horizontal" + android:paddingTop="@dimen/standard_half_padding" + android:paddingBottom="@dimen/standard_half_padding"> + android:text="@string/scope_local_description" + android:textColor="@color/textColorMaxContrast" + android:textSize="14sp" /> @@ -107,36 +119,38 @@ android:id="@+id/scope_federated" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/standard_margin" - android:layout_marginTop="@dimen/standard_half_margin" - android:orientation="horizontal"> + android:orientation="horizontal" + android:paddingTop="@dimen/standard_half_padding" + android:paddingBottom="@dimen/standard_half_padding"> + android:text="@string/scope_federated_description" + android:textColor="@color/textColorMaxContrast" + android:textSize="14sp" /> @@ -146,36 +160,38 @@ android:id="@+id/scope_published" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/standard_margin" - android:layout_marginTop="@dimen/standard_half_margin" - android:orientation="horizontal"> + android:orientation="horizontal" + android:paddingTop="@dimen/standard_half_padding" + android:paddingBottom="@dimen/standard_half_padding"> + android:text="@string/scope_published_description" + android:textColor="@color/textColorMaxContrast" + android:textSize="14sp" />