From 6ab5dace1c3fb7f7bb2d9c28dcf4f83e68d83e04 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Fri, 1 Jul 2022 15:40:19 +0200 Subject: [PATCH] fix layouts to handle poll with many options make options scrollable replace constraint layout with linear layouts + layout_weight="1" Signed-off-by: Marcel Hibbe --- app/src/main/res/layout/dialog_poll_main.xml | 50 ++++++------ .../main/res/layout/dialog_poll_results.xml | 50 ++++++------ app/src/main/res/layout/dialog_poll_vote.xml | 78 ++++++++++--------- .../res/layout/poll_result_header_item.xml | 2 + .../res/layout/poll_result_voter_item.xml | 2 + 5 files changed, 95 insertions(+), 87 deletions(-) diff --git a/app/src/main/res/layout/dialog_poll_main.xml b/app/src/main/res/layout/dialog_poll_main.xml index 59e5e8a84..47385ab6e 100644 --- a/app/src/main/res/layout/dialog_poll_main.xml +++ b/app/src/main/res/layout/dialog_poll_main.xml @@ -16,34 +16,37 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . --> - - - android:contentDescription="@null" - android:src="@drawable/ic_baseline_bar_chart_24" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:tint="@color/high_emphasis_menu_icon" /> + - + + + + android:layout_weight="1" /> - + diff --git a/app/src/main/res/layout/dialog_poll_results.xml b/app/src/main/res/layout/dialog_poll_results.xml index 28af8336b..366f21830 100644 --- a/app/src/main/res/layout/dialog_poll_results.xml +++ b/app/src/main/res/layout/dialog_poll_results.xml @@ -16,19 +16,19 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . --> - + tools:background="@color/white" + android:orientation="vertical"> + android:layout_height="0dp" + android:layout_weight="1"> - + android:gravity="end"> - + - + + + + diff --git a/app/src/main/res/layout/dialog_poll_vote.xml b/app/src/main/res/layout/dialog_poll_vote.xml index c6f6c5e7c..964204229 100644 --- a/app/src/main/res/layout/dialog_poll_vote.xml +++ b/app/src/main/res/layout/dialog_poll_vote.xml @@ -16,60 +16,62 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . --> - + tools:background="@color/white" + android:orientation="vertical"> - + android:layout_height="0dp" + android:layout_weight="1" + android:padding="@dimen/standard_half_padding"> + + + + + - + android:layout_height="wrap_content" + android:text="@string/polls_end_poll" + style="@style/OutlinedButton" + android:layout_marginEnd="@dimen/standard_margin" + app:cornerRadius="@dimen/button_corner_radius" /> + - - - - - - - + diff --git a/app/src/main/res/layout/poll_result_header_item.xml b/app/src/main/res/layout/poll_result_header_item.xml index edfe72461..f3d444610 100644 --- a/app/src/main/res/layout/poll_result_header_item.xml +++ b/app/src/main/res/layout/poll_result_header_item.xml @@ -3,6 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:paddingStart="@dimen/standard_half_padding" + android:paddingEnd="@dimen/standard_half_padding" tools:background="@color/white">