mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Updated forward/reply icons + fixed long press on text in bubble not working
This commit is contained in:
parent
b4a52e244d
commit
fa78f7b9b3
6 changed files with 51 additions and 6 deletions
9
app/src/main/res/drawable/forward.xml
Normal file
9
app/src/main/res/drawable/forward.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="28dp"
|
||||
android:height="28dp"
|
||||
android:viewportWidth="28"
|
||||
android:viewportHeight="28">
|
||||
<path
|
||||
android:pathData="M25.422,14.19L17.089,22.523C16.973,22.64 16.824,22.719 16.662,22.751C16.501,22.784 16.333,22.767 16.181,22.704C16.028,22.641 15.898,22.534 15.807,22.397C15.715,22.26 15.666,22.098 15.666,21.934V17.791C9.718,18.128 5.64,21.986 4.496,23.208C4.316,23.399 4.08,23.53 3.822,23.58C3.564,23.63 3.296,23.598 3.058,23.487C2.819,23.377 2.622,23.194 2.493,22.964C2.364,22.735 2.311,22.471 2.342,22.21C2.728,18.849 4.569,15.617 7.525,13.109C9.98,11.026 12.964,9.704 15.666,9.472V5.267C15.666,5.102 15.715,4.941 15.807,4.804C15.898,4.667 16.028,4.56 16.181,4.497C16.333,4.434 16.501,4.417 16.662,4.449C16.824,4.482 16.973,4.561 17.089,4.678L25.422,13.011C25.5,13.088 25.561,13.18 25.603,13.281C25.645,13.382 25.667,13.491 25.667,13.6C25.667,13.71 25.645,13.818 25.603,13.92C25.561,14.021 25.5,14.113 25.422,14.19Z"
|
||||
android:fillColor="#6C7A87"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/reply.xml
Normal file
9
app/src/main/res/drawable/reply.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="28dp"
|
||||
android:height="28dp"
|
||||
android:viewportWidth="28"
|
||||
android:viewportHeight="28">
|
||||
<path
|
||||
android:pathData="M2.578,14.19L10.911,22.523C11.027,22.64 11.176,22.719 11.338,22.751C11.499,22.784 11.667,22.767 11.819,22.704C11.972,22.641 12.102,22.534 12.193,22.397C12.285,22.26 12.334,22.098 12.334,21.934V17.791C18.281,18.128 22.36,21.986 23.504,23.208C23.684,23.399 23.92,23.53 24.178,23.58C24.436,23.63 24.704,23.598 24.942,23.487C25.181,23.377 25.378,23.194 25.507,22.964C25.636,22.735 25.689,22.471 25.658,22.21C25.272,18.849 23.431,15.617 20.475,13.109C18.02,11.026 15.036,9.704 12.334,9.472V5.267C12.334,5.102 12.285,4.941 12.193,4.804C12.102,4.667 11.972,4.56 11.819,4.497C11.667,4.434 11.499,4.417 11.338,4.449C11.176,4.482 11.027,4.561 10.911,4.678L2.578,13.011C2.5,13.088 2.439,13.18 2.397,13.281C2.355,13.382 2.333,13.491 2.333,13.6C2.333,13.71 2.355,13.818 2.397,13.92C2.439,14.021 2.5,14.113 2.578,14.19Z"
|
||||
android:fillColor="#6C7A87"/>
|
||||
</vector>
|
||||
|
|
@ -6,6 +6,9 @@
|
|||
<data>
|
||||
<import type="android.view.View" />
|
||||
<import type="com.google.android.flexbox.JustifyContent" />
|
||||
<variable
|
||||
name="onLongClickListener"
|
||||
type="View.OnLongClickListener" />
|
||||
<variable
|
||||
name="model"
|
||||
type="org.linphone.ui.main.chat.model.ChatMessageModel" />
|
||||
|
|
@ -47,6 +50,7 @@
|
|||
<org.linphone.ui.main.chat.view.ChatBubbleTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/text_content"
|
||||
android:onLongClick="@{onLongClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{model.text, default=`Lorem ipsum dolor sit amet`}"
|
||||
|
|
|
|||
|
|
@ -82,6 +82,16 @@
|
|||
app:layout_constraintEnd_toEndOf="@id/reply"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/reply_icon"
|
||||
android:layout_width="@dimen/small_icon_size"
|
||||
android:layout_height="@dimen/small_icon_size"
|
||||
android:src="@drawable/reply"
|
||||
android:visibility="@{model.isReply ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:tint="@color/gray_main2_500"
|
||||
app:layout_constraintStart_toEndOf="@id/reply_background"
|
||||
app:layout_constraintBottom_toTopOf="@id/background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/reply"
|
||||
|
|
@ -89,7 +99,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@{model.replyText, default=`Ceci est une réponse!`}"
|
||||
android:text="@{model.replyText, default=`Reply`}"
|
||||
android:textColor="@color/gray_main2_500"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="2"
|
||||
|
|
@ -125,6 +135,7 @@
|
|||
android:id="@+id/contents"
|
||||
layout="@layout/chat_bubble_content"
|
||||
model="@{model}"
|
||||
onLongClickListener="@{onLongClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@
|
|||
android:enabled="@{!model.chatRoomIsReadOnly}"
|
||||
android:background="@drawable/menu_item_background"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:drawableStart="@drawable/arrow_bend_up_left_bold"
|
||||
android:drawableStart="@drawable/reply"
|
||||
app:layout_constraintBottom_toTopOf="@id/copy"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
|
@ -224,7 +224,7 @@
|
|||
android:text="@string/menu_forward_chat_message"
|
||||
android:background="@drawable/menu_item_background"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:drawableStart="@drawable/arrow_bend_up_right_bold"
|
||||
android:drawableStart="@drawable/forward"
|
||||
app:layout_constraintBottom_toTopOf="@id/delete"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
android:onClick="@{scrollToRepliedMessageClickListener}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/shape_chat_bubble_reply"
|
||||
android:visibility="@{model.isReply ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintTop_toTopOf="@id/reply"
|
||||
|
|
@ -52,14 +53,24 @@
|
|||
app:layout_constraintEnd_toEndOf="@id/reply"
|
||||
app:layout_constraintBottom_toBottomOf="@id/background" />
|
||||
|
||||
<org.linphone.ui.main.chat.view.ChatBubbleTextView
|
||||
<ImageView
|
||||
android:id="@+id/reply_icon"
|
||||
android:layout_width="@dimen/small_icon_size"
|
||||
android:layout_height="@dimen/small_icon_size"
|
||||
android:src="@drawable/reply"
|
||||
android:visibility="@{model.isReply ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:tint="@color/gray_main2_500"
|
||||
app:layout_constraintStart_toEndOf="@id/reply_background"
|
||||
app:layout_constraintBottom_toTopOf="@id/background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:onClick="@{scrollToRepliedMessageClickListener}"
|
||||
android:id="@+id/reply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@{model.replyText, default=`Ceci est une réponse!`}"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@{model.replyText, default=`Reply`}"
|
||||
android:textColor="@color/gray_main2_500"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="2"
|
||||
|
|
@ -86,6 +97,7 @@
|
|||
android:id="@+id/contents"
|
||||
layout="@layout/chat_bubble_content"
|
||||
model="@{model}"
|
||||
onLongClickListener="@{onLongClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue