mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-22 06:08:09 +00:00
Small improvements over reactions layout
This commit is contained in:
parent
d178ce40b5
commit
6f9a5a6009
5 changed files with 21 additions and 22 deletions
|
|
@ -413,7 +413,8 @@ class MessageModel @WorkerThread constructor(
|
|||
}
|
||||
|
||||
if (sameReactionTwiceOrMore) {
|
||||
reactionsList += allReactions.size.toString()
|
||||
val count = allReactions.size.toString()
|
||||
reactionsList += " $count"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,10 @@ class SlidingPaneBackPressedCallback(private val slidingPaneLayout: SlidingPaneL
|
|||
slidingPaneLayout.hideKeyboard()
|
||||
slidingPaneLayout.closePane()
|
||||
} else {
|
||||
Log.w("$TAG handleOnBackPressed: sliding pane is not open!")
|
||||
Log.w(
|
||||
"$TAG handleOnBackPressed: sliding pane is not open, disabling back press callback!"
|
||||
)
|
||||
isEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -233,21 +233,12 @@
|
|||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/message_reaction_style"
|
||||
android:id="@+id/reactions"
|
||||
android:onClick="@{showReactionInfoClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_chat_bubble_reactions_background"
|
||||
android:text="@{model.reactions, default=@string/emoji_love}"
|
||||
android:textSize="15sp"
|
||||
android:textColor="?attr/color_main2_600"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:visibility="@{model.reactions.length() > 0 ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintEnd_toEndOf="@id/bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/bubble"
|
||||
|
|
|
|||
|
|
@ -195,21 +195,12 @@
|
|||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/message_reaction_style"
|
||||
android:id="@+id/reactions"
|
||||
android:onClick="@{showReactionInfoClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_chat_bubble_reactions_background"
|
||||
android:text="@{model.reactions, default=@string/emoji_love}"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?attr/color_main2_600"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:visibility="@{model.reactions.length() > 0 ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintEnd_toEndOf="@id/bubble"
|
||||
app:layout_constraintTop_toBottomOf="@id/bubble"
|
||||
|
|
|
|||
|
|
@ -125,6 +125,19 @@
|
|||
<item name="android:elevation">3dp</item>
|
||||
<item name="android:background">@drawable/circle_white_button_background</item>
|
||||
</style>
|
||||
<style name="message_reaction_style">
|
||||
<item name="android:fontFamily">@font/noto_sans</item>
|
||||
<item name="android:textColor">?attr/color_main2_600</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:paddingStart">10dp</item>
|
||||
<item name="android:paddingEnd">10dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:paddingTop">2dp</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:layout_marginTop">-15dp</item>
|
||||
<item name="android:layout_marginBottom">10dp</item>
|
||||
<item name="android:background">@drawable/shape_chat_bubble_reactions_background</item>
|
||||
</style>
|
||||
<style name="call_numpad_digits_style">
|
||||
<item name="android:fontFamily">@font/noto_sans</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue