wip2: styling of poll bars

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-06-29 12:28:08 +02:00 committed by Andy Scherzinger (Rebase PR Action)
parent bddd6b2e8e
commit 909ee07ce6
3 changed files with 8 additions and 5 deletions

View file

@ -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 {

View file

@ -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" />
<LinearLayout

View file

@ -106,6 +106,9 @@
<color name="list_divider_background">#eeeeee</color>
<color name="grey_200">#EEEEEE</color>
<!-- poll -->
<color name="poll_bar_color">#8dd4f6</color>
<!-- this is just a helper for status icon background because getting the background color of a dialog is not
possible?! don't use this to set the background of dialogs -->
<color name="dialog_background">#FFFFFF</color>