fix to provide all call emojis

As the number of provided emojis grew, there was a bug that only one emoji was shown.

Putting all 12 emojis would have been too close, so it's implemented to scroll them horizontally

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-11-12 13:27:04 +01:00
parent 3908d0ce14
commit 59ee0b0cb1
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 20 additions and 12 deletions

View File

@ -96,9 +96,8 @@ class MoreCallActionsDialog(private val callActivity: CallActivity) : BottomShee
capabilities?.spreedCapability?.config!!["call"]!!["supported-reactions"] as ArrayList<*> capabilities?.spreedCapability?.config!!["call"]!!["supported-reactions"] as ArrayList<*>
val param = LinearLayout.LayoutParams( val param = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, EMOJI_WIDTH,
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT
1.0f
) )
availableReactions.forEach { availableReactions.forEach {
@ -185,5 +184,6 @@ class MoreCallActionsDialog(private val callActivity: CallActivity) : BottomShee
companion object { companion object {
private const val TAG = "MoreCallActionsDialog" private const val TAG = "MoreCallActionsDialog"
private const val TEXT_SIZE = 20f private const val TEXT_SIZE = 20f
private const val EMOJI_WIDTH = 80
} }
} }

View File

@ -18,19 +18,27 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdgeLength="30dp"
android:layout_marginStart="@dimen/standard_margin"
android:layout_marginEnd="@dimen/standard_margin"
android:requiresFadingEdge="horizontal"
android:scrollbars="none">
<LinearLayout <LinearLayout
android:id="@+id/call_emoji_bar" android:id="@+id/call_emoji_bar"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/standard_margin"
android:layout_marginTop="@dimen/standard_half_margin" android:layout_marginTop="@dimen/standard_half_margin"
android:layout_marginEnd="@dimen/standard_margin"
android:layout_marginBottom="@dimen/standard_half_margin" android:layout_marginBottom="@dimen/standard_half_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal">
android:weightSum="10">
</LinearLayout> </LinearLayout>
</HorizontalScrollView>
<TextView <TextView
android:id="@+id/advanced_call_options_title" android:id="@+id/advanced_call_options_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"