mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
wip2: styling of poll bars
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
bddd6b2e8e
commit
909ee07ce6
@ -27,7 +27,7 @@ class PollResultViewHolder(
|
|||||||
fun bind(pollResultItem: PollResultItem, clickListener: PollResultItemClickListener) {
|
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.root.setOnClickListener { clickListener.onClick(pollResultItem) }
|
||||||
|
|
||||||
binding.pollOptionText.text = pollResultItem.name
|
binding.pollOptionText.text = pollResultItem.name
|
||||||
binding.pollOptionPercentText.text = "${pollResultItem.percent}%"
|
binding.pollOptionPercentText.text = "${pollResultItem.percent}%"
|
||||||
@ -43,8 +43,8 @@ class PollResultViewHolder(
|
|||||||
binding.pollOptionDetail.visibility = View.VISIBLE
|
binding.pollOptionDetail.visibility = View.VISIBLE
|
||||||
|
|
||||||
val lp = LinearLayout.LayoutParams(
|
val lp = LinearLayout.LayoutParams(
|
||||||
90,
|
60,
|
||||||
70
|
50
|
||||||
)
|
)
|
||||||
|
|
||||||
pollResultItem.voters.forEach {
|
pollResultItem.voters.forEach {
|
||||||
|
@ -28,12 +28,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:indeterminate="false"
|
android:indeterminate="false"
|
||||||
app:indicatorColor="@color/colorPrimary"
|
app:indicatorColor="@color/poll_bar_color"
|
||||||
app:layout_constraintStart_toStartOf="@+id/poll_option_text"
|
app:layout_constraintStart_toStartOf="@+id/poll_option_text"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/poll_option_text"
|
app:layout_constraintTop_toBottomOf="@+id/poll_option_text"
|
||||||
app:trackColor="@color/dialog_background"
|
app:trackColor="@color/dialog_background"
|
||||||
app:trackCornerRadius="5dp"
|
app:trackCornerRadius="5dp"
|
||||||
app:trackThickness="10dp"
|
app:trackThickness="5dp"
|
||||||
tools:progress="50" />
|
tools:progress="50" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -106,6 +106,9 @@
|
|||||||
<color name="list_divider_background">#eeeeee</color>
|
<color name="list_divider_background">#eeeeee</color>
|
||||||
<color name="grey_200">#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
|
<!-- 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 -->
|
possible?! don't use this to set the background of dialogs -->
|
||||||
<color name="dialog_background">#FFFFFF</color>
|
<color name="dialog_background">#FFFFFF</color>
|
||||||
|
Loading…
Reference in New Issue
Block a user