fix: show multiline poll options (#837)
* fix: show multiline poll options * fix resources not found exception * don't force height on poll options --------- Co-authored-by: sk <sk22@mailbox.org>
This commit is contained in:
parent
4de7211523
commit
6d085ae6f0
|
@ -207,7 +207,7 @@ public class PushNotificationReceiver extends BroadcastReceiver{
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
.setCategory(Notification.CATEGORY_SOCIAL)
|
.setCategory(Notification.CATEGORY_SOCIAL)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setLights(context.getColor(android.R.attr.colorAccent), 500, 1000)
|
.setLights(UiUtils.getThemeColor(context, android.R.attr.colorAccent), 500, 1000)
|
||||||
.setColor(UiUtils.getThemeColor(context, android.R.attr.colorAccent));
|
.setColor(UiUtils.getThemeColor(context, android.R.attr.colorAccent));
|
||||||
|
|
||||||
if (!GlobalUserPreferences.uniformNotificationIcon) {
|
if (!GlobalUserPreferences.uniformNotificationIcon) {
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class PollOptionStatusDisplayItem extends StatusDisplayItem{
|
||||||
progressBg=activity.getResources().getDrawable(R.drawable.bg_poll_option_voted, activity.getTheme()).mutate();
|
progressBg=activity.getResources().getDrawable(R.drawable.bg_poll_option_voted, activity.getTheme()).mutate();
|
||||||
progressBgInset=activity.getResources().getDrawable(R.drawable.bg_poll_option_voted_inset, activity.getTheme()).mutate();
|
progressBgInset=activity.getResources().getDrawable(R.drawable.bg_poll_option_voted_inset, activity.getTheme()).mutate();
|
||||||
itemView.setOnClickListener(this::onButtonClick);
|
itemView.setOnClickListener(this::onButtonClick);
|
||||||
button.setOutlineProvider(OutlineProviders.M3_BUTTON);
|
button.setOutlineProvider(OutlineProviders.roundedRect(20));
|
||||||
button.setClipToOutline(true);
|
button.setClipToOutline(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<shape>
|
<shape>
|
||||||
<stroke android:width="1dp" android:color="?colorM3Outline"/>
|
<stroke android:width="1dp" android:color="?colorM3Outline"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:id="@android:id/mask" android:gravity="center_vertical" android:height="40dp">
|
<item android:id="@android:id/mask">
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="#000"/>
|
<solid android:color="#000"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<shape>
|
<shape>
|
||||||
<stroke android:width="1dp" android:color="?colorM3Outline"/>
|
<stroke android:width="1dp" android:color="?colorM3Outline"/>
|
||||||
<solid android:color="?colorM3Surface"/>
|
<solid android:color="?colorM3Surface"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:id="@android:id/mask" android:gravity="center_vertical" android:height="40dp">
|
<item android:id="@android:id/mask">
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="#000"/>
|
<solid android:color="#000"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<scale android:scaleGravity="start|fill_vertical" android:scaleWidth="100%">
|
<scale android:scaleGravity="start|fill_vertical" android:scaleWidth="100%">
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="?colorM3SecondaryContainer"/>
|
<solid android:color="?colorM3SecondaryContainer"/>
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
</shape>
|
</shape>
|
||||||
</scale>
|
</scale>
|
||||||
</item>
|
</item>
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<shape>
|
<shape>
|
||||||
<stroke android:width="1dp" android:color="?colorM3OutlineVariant"/>
|
<stroke android:width="1dp" android:color="?colorM3OutlineVariant"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="?colorM3Surface"/>
|
<solid android:color="?colorM3Surface"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<scale android:scaleGravity="start|fill_vertical" android:scaleWidth="100%">
|
<scale android:scaleGravity="start|fill_vertical" android:scaleWidth="100%">
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="@color/poll_option_progress_inset"/>
|
<solid android:color="@color/poll_option_progress_inset"/>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
</shape>
|
</shape>
|
||||||
</scale>
|
</scale>
|
||||||
</item>
|
</item>
|
||||||
<item android:gravity="center_vertical" android:height="40dp">
|
<item>
|
||||||
<shape>
|
<shape>
|
||||||
<stroke android:width="1dp" android:color="?colorM3Outline"/>
|
<stroke android:width="1dp" android:color="?colorM3Outline"/>
|
||||||
<corners android:radius="20dp"/>
|
<corners android:radius="20dp"/>
|
||||||
|
|
|
@ -5,28 +5,30 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="4dp"
|
android:paddingVertical="4dp"
|
||||||
android:clipToPadding="false">
|
android:clipToPadding="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/button"
|
android:id="@+id/button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="40dp"
|
||||||
android:background="@drawable/bg_poll_option_clickable"
|
android:background="@drawable/bg_poll_option_clickable"
|
||||||
android:duplicateParentState="true"
|
android:duplicateParentState="true"
|
||||||
android:layoutDirection="locale">
|
android:layoutDirection="locale">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:paddingVertical="8dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:tint="?colorM3OnSecondaryContainer"
|
android:tint="?colorM3OnSecondaryContainer"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
|
@ -41,7 +43,6 @@
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:textAppearance="@style/m3_label_large"
|
android:textAppearance="@style/m3_label_large"
|
||||||
android:textColor="?colorM3Primary"
|
android:textColor="?colorM3Primary"
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:paddingEnd="26dp"
|
android:paddingEnd="26dp"
|
||||||
tools:text="scream into void jsfdklfjdalskfjdsalkfjdsalkfjdsalkfdjsalkfdsajlk"/>
|
tools:text="scream into void jsfdklfjdalskfjdsalkfjdsalkfjdsalkfdjsalkfdsajlk"/>
|
||||||
|
|
Loading…
Reference in New Issue