From 909ee07ce6bb34b9647c6cacd2e66a6823178d9d Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Wed, 29 Jun 2022 12:28:08 +0200 Subject: [PATCH] wip2: styling of poll bars Signed-off-by: Marcel Hibbe --- .../nextcloud/talk/polls/adapters/PollResultViewHolder.kt | 6 +++--- app/src/main/res/layout/poll_result_item.xml | 4 ++-- app/src/main/res/values/colors.xml | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt b/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt index b8f400340..dab8c90bd 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/adapters/PollResultViewHolder.kt @@ -27,7 +27,7 @@ class PollResultViewHolder( fun bind(pollResultItem: PollResultItem, clickListener: PollResultItemClickListener) { binding.root.setOnClickListener { clickListener.onClick(pollResultItem) } - // binding.root.setOnClickListener { clickListener.onClick(pollResultItem) } + binding.root.setOnClickListener { clickListener.onClick(pollResultItem) } binding.pollOptionText.text = pollResultItem.name binding.pollOptionPercentText.text = "${pollResultItem.percent}%" @@ -43,8 +43,8 @@ class PollResultViewHolder( binding.pollOptionDetail.visibility = View.VISIBLE val lp = LinearLayout.LayoutParams( - 90, - 70 + 60, + 50 ) pollResultItem.voters.forEach { diff --git a/app/src/main/res/layout/poll_result_item.xml b/app/src/main/res/layout/poll_result_item.xml index cb8bfb47e..9e2852d3f 100644 --- a/app/src/main/res/layout/poll_result_item.xml +++ b/app/src/main/res/layout/poll_result_item.xml @@ -28,12 +28,12 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:indeterminate="false" - app:indicatorColor="@color/colorPrimary" + app:indicatorColor="@color/poll_bar_color" app:layout_constraintStart_toStartOf="@+id/poll_option_text" app:layout_constraintTop_toBottomOf="@+id/poll_option_text" app:trackColor="@color/dialog_background" app:trackCornerRadius="5dp" - app:trackThickness="10dp" + app:trackThickness="5dp" tools:progress="50" /> #eeeeee #EEEEEE + + #8dd4f6 + #FFFFFF