Unverified Commit cedc1254 authored by Leonardo Aramaki's avatar Leonardo Aramaki Committed by GitHub

Merge pull request #1405 from RocketChat/improvement/quote-redesign

[IMPROVEMENT] Quote bar redesign and set it to open even if offline 
parents 80cfd440 70a6f6b6
...@@ -16,7 +16,7 @@ class ColorAttachmentViewHolder(itemView: View, ...@@ -16,7 +16,7 @@ class ColorAttachmentViewHolder(itemView: View,
: BaseViewHolder<ColorAttachmentUiModel>(itemView, listener, reactionListener) { : BaseViewHolder<ColorAttachmentUiModel>(itemView, listener, reactionListener) {
val drawable: Drawable? = ContextCompat.getDrawable(itemView.context, val drawable: Drawable? = ContextCompat.getDrawable(itemView.context,
R.drawable.quote_vertical_bar) R.drawable.quote_vertical_gray_bar)
init { init {
with(itemView) { with(itemView) {
......
...@@ -16,7 +16,18 @@ import chat.rocket.android.core.lifecycle.CancelStrategy ...@@ -16,7 +16,18 @@ import chat.rocket.android.core.lifecycle.CancelStrategy
import chat.rocket.android.helper.MessageHelper import chat.rocket.android.helper.MessageHelper
import chat.rocket.android.helper.UserHelper import chat.rocket.android.helper.UserHelper
import chat.rocket.android.infrastructure.LocalRepository import chat.rocket.android.infrastructure.LocalRepository
import chat.rocket.android.server.domain.* import chat.rocket.android.server.domain.ChatRoomsInteractor
import chat.rocket.android.server.domain.GetCurrentServerInteractor
import chat.rocket.android.server.domain.GetSettingsInteractor
import chat.rocket.android.server.domain.JobSchedulerInteractor
import chat.rocket.android.server.domain.MessagesRepository
import chat.rocket.android.server.domain.PermissionsInteractor
import chat.rocket.android.server.domain.PublicSettings
import chat.rocket.android.server.domain.RoomRepository
import chat.rocket.android.server.domain.UsersRepository
import chat.rocket.android.server.domain.uploadMaxFileSize
import chat.rocket.android.server.domain.uploadMimeTypeFilter
import chat.rocket.android.server.domain.useRealName
import chat.rocket.android.server.infraestructure.ConnectionManagerFactory import chat.rocket.android.server.infraestructure.ConnectionManagerFactory
import chat.rocket.android.server.infraestructure.state import chat.rocket.android.server.infraestructure.state
import chat.rocket.android.util.extensions.avatarUrl import chat.rocket.android.util.extensions.avatarUrl
...@@ -33,11 +44,27 @@ import chat.rocket.core.internal.realtime.setTypingStatus ...@@ -33,11 +44,27 @@ import chat.rocket.core.internal.realtime.setTypingStatus
import chat.rocket.core.internal.realtime.socket.model.State import chat.rocket.core.internal.realtime.socket.model.State
import chat.rocket.core.internal.realtime.subscribeTypingStatus import chat.rocket.core.internal.realtime.subscribeTypingStatus
import chat.rocket.core.internal.realtime.unsubscribe import chat.rocket.core.internal.realtime.unsubscribe
import chat.rocket.core.internal.rest.* import chat.rocket.core.internal.rest.chatRoomRoles
import chat.rocket.core.internal.rest.commands
import chat.rocket.core.internal.rest.deleteMessage
import chat.rocket.core.internal.rest.getMembers
import chat.rocket.core.internal.rest.history
import chat.rocket.core.internal.rest.joinChat
import chat.rocket.core.internal.rest.markAsRead
import chat.rocket.core.internal.rest.messages
import chat.rocket.core.internal.rest.pinMessage
import chat.rocket.core.internal.rest.runCommand
import chat.rocket.core.internal.rest.sendMessage
import chat.rocket.core.internal.rest.spotlight
import chat.rocket.core.internal.rest.starMessage
import chat.rocket.core.internal.rest.toggleReaction
import chat.rocket.core.internal.rest.unpinMessage
import chat.rocket.core.internal.rest.unstarMessage
import chat.rocket.core.internal.rest.updateMessage
import chat.rocket.core.internal.rest.uploadFile
import chat.rocket.core.model.ChatRoomRole import chat.rocket.core.model.ChatRoomRole
import chat.rocket.core.model.Command import chat.rocket.core.model.Command
import chat.rocket.core.model.Message import chat.rocket.core.model.Message
import chat.rocket.core.model.Myself
import kotlinx.coroutines.experimental.CommonPool import kotlinx.coroutines.experimental.CommonPool
import kotlinx.coroutines.experimental.DefaultDispatcher import kotlinx.coroutines.experimental.DefaultDispatcher
import kotlinx.coroutines.experimental.android.UI import kotlinx.coroutines.experimental.android.UI
...@@ -139,12 +166,10 @@ class ChatRoomPresenter @Inject constructor( ...@@ -139,12 +166,10 @@ class ChatRoomPresenter @Inject constructor(
try { try {
if (offset == 0L) { if (offset == 0L) {
val localMessages = messagesRepository.getByRoomId(chatRoomId) val localMessages = messagesRepository.getByRoomId(chatRoomId)
val oldMessages = mapper.map( val oldMessages = mapper.map(localMessages, RoomUiModel(
localMessages, RoomUiModel( roles = chatRoles,
roles = chatRoles, isBroadcast = chatIsBroadcast, isRoom = true
isBroadcast = chatIsBroadcast, isRoom = true ))
)
)
if (oldMessages.isNotEmpty()) { if (oldMessages.isNotEmpty()) {
view.showMessages(oldMessages) view.showMessages(oldMessages)
loadMissingMessages() loadMissingMessages()
...@@ -187,12 +212,10 @@ class ChatRoomPresenter @Inject constructor( ...@@ -187,12 +212,10 @@ class ChatRoomPresenter @Inject constructor(
} }
messagesRepository.saveAll(messages) messagesRepository.saveAll(messages)
view.showMessages( view.showMessages(
mapper.map( mapper.map(messages, RoomUiModel(
messages, RoomUiModel( roles = chatRoles,
roles = chatRoles, isBroadcast = chatIsBroadcast, isRoom = true
isBroadcast = chatIsBroadcast, isRoom = true ))
)
)
) )
} }
...@@ -231,8 +254,8 @@ class ChatRoomPresenter @Inject constructor( ...@@ -231,8 +254,8 @@ class ChatRoomPresenter @Inject constructor(
view.showNewMessage( view.showNewMessage(
mapper.map( mapper.map(
newMessage, RoomUiModel( newMessage, RoomUiModel(
roles = chatRoles, isBroadcast = chatIsBroadcast roles = chatRoles, isBroadcast = chatIsBroadcast
) )
) )
) )
client.sendMessage(id, chatRoomId, text) client.sendMessage(id, chatRoomId, text)
...@@ -415,13 +438,11 @@ class ChatRoomPresenter @Inject constructor( ...@@ -415,13 +438,11 @@ class ChatRoomPresenter @Inject constructor(
Timber.d("History: $messages") Timber.d("History: $messages")
if (messages.result.isNotEmpty()) { if (messages.result.isNotEmpty()) {
val models = mapper.map( val models = mapper.map(messages.result, RoomUiModel(
messages.result, RoomUiModel( roles = chatRoles,
roles = chatRoles, isBroadcast = chatIsBroadcast,
isBroadcast = chatIsBroadcast, isRoom = true
isRoom = true ))
)
)
messagesRepository.saveAll(messages.result) messagesRepository.saveAll(messages.result)
launchUI(strategy) { launchUI(strategy) {
...@@ -481,18 +502,12 @@ class ChatRoomPresenter @Inject constructor( ...@@ -481,18 +502,12 @@ class ChatRoomPresenter @Inject constructor(
fun citeMessage(roomName: String, roomType: String, messageId: String, mentionAuthor: Boolean) { fun citeMessage(roomName: String, roomType: String, messageId: String, mentionAuthor: Boolean) {
launchUI(strategy) { launchUI(strategy) {
val message = messagesRepository.getById(messageId) val message = messagesRepository.getById(messageId)
val me: Myself? = try { val currentUsername: String? = userHelper.user()?.username
retryIO("me()") { client.me() } //TODO: Cache this and use an interactor
} catch (ex: Exception) {
Timber.e(ex)
null
}
message?.let { msg -> message?.let { msg ->
val id = msg.id val id = msg.id
val username = msg.sender?.username ?: "" val username = msg.sender?.username ?: ""
val mention = if (mentionAuthor && me?.username != username) "@$username" else "" val mention = if (mentionAuthor && currentUsername != username) "@$username" else ""
val room = val room = if (roomTypeOf(roomType) is RoomType.DirectMessage) username else roomName
if (roomTypeOf(roomType) is RoomType.DirectMessage) username else roomName
val chatRoomType = when (roomTypeOf(roomType)) { val chatRoomType = when (roomTypeOf(roomType)) {
is RoomType.DirectMessage -> "direct" is RoomType.DirectMessage -> "direct"
is RoomType.PrivateGroup -> "group" is RoomType.PrivateGroup -> "group"
...@@ -503,12 +518,10 @@ class ChatRoomPresenter @Inject constructor( ...@@ -503,12 +518,10 @@ class ChatRoomPresenter @Inject constructor(
view.showReplyingAction( view.showReplyingAction(
username = getDisplayName(msg.sender), username = getDisplayName(msg.sender),
replyMarkdown = "[ ]($currentServer/$chatRoomType/$room?msg=$id) $mention ", replyMarkdown = "[ ]($currentServer/$chatRoomType/$room?msg=$id) $mention ",
quotedMessage = mapper.map( quotedMessage = mapper.map(message, RoomUiModel(
message, RoomUiModel( roles = chatRoles,
roles = chatRoles, isBroadcast = chatIsBroadcast
isBroadcast = chatIsBroadcast )).last().preview?.message ?: ""
)
).last().preview?.message ?: ""
) )
} }
} }
...@@ -912,11 +925,9 @@ class ChatRoomPresenter @Inject constructor( ...@@ -912,11 +925,9 @@ class ChatRoomPresenter @Inject constructor(
private fun updateMessage(streamedMessage: Message) { private fun updateMessage(streamedMessage: Message) {
launchUI(strategy) { launchUI(strategy) {
val viewModelStreamedMessage = mapper.map( val viewModelStreamedMessage = mapper.map(streamedMessage, RoomUiModel(
streamedMessage, RoomUiModel( roles = chatRoles, isBroadcast = chatIsBroadcast
roles = chatRoles, isBroadcast = chatIsBroadcast ))
)
)
val roomMessages = messagesRepository.getByRoomId(streamedMessage.roomId) val roomMessages = messagesRepository.getByRoomId(streamedMessage.roomId)
val index = roomMessages.indexOfFirst { msg -> msg.id == streamedMessage.id } val index = roomMessages.indexOfFirst { msg -> msg.id == streamedMessage.id }
......
package chat.rocket.android.chatroom.ui package chat.rocket.android.chatroom.ui
import com.google.android.material.snackbar.BaseTransientBottomBar
import androidx.core.view.ViewCompat
import android.text.Spannable import android.text.Spannable
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.core.view.ViewCompat
import androidx.core.view.setPadding
import chat.rocket.android.R import chat.rocket.android.R
import chat.rocket.android.helper.MessageParser import chat.rocket.android.helper.MessageParser
import chat.rocket.android.util.extensions.content import chat.rocket.android.util.extensions.content
import com.google.android.material.snackbar.BaseTransientBottomBar
import kotlinx.android.synthetic.main.message_action_bar.view.*
import ru.noties.markwon.Markwon import ru.noties.markwon.Markwon
class ActionSnackbar : BaseTransientBottomBar<ActionSnackbar> { class ActionSnackbar private constructor(
parentViewGroup: ViewGroup, content:
View, contentViewCallback: com.google.android.material.snackbar.ContentViewCallback
) : BaseTransientBottomBar<ActionSnackbar>(parentViewGroup, content, contentViewCallback) {
companion object { companion object {
fun make(parentViewGroup: ViewGroup, content: String = "", parser: MessageParser): ActionSnackbar { fun make(parentViewGroup: ViewGroup, content: String = "", parser: MessageParser): ActionSnackbar {
val context = parentViewGroup.context val context = parentViewGroup.context
val view = LayoutInflater.from(context).inflate(R.layout.message_action_bar, parentViewGroup, false) val view = LayoutInflater.from(context).inflate(R.layout.message_action_bar, parentViewGroup, false)
val actionSnackbar = ActionSnackbar(parentViewGroup, view, CallbackImpl(view)) val actionSnackbar = ActionSnackbar(parentViewGroup, view, CallbackImpl(view))
actionSnackbar.parser = parser with(view) {
actionSnackbar.messageTextView = view.findViewById(R.id.text_view_action_text) as TextView actionSnackbar.getView().setPadding(0)
actionSnackbar.titleTextView = view.findViewById(R.id.text_view_action_title) as TextView actionSnackbar.getView().setBackgroundColor(ContextCompat.getColor(context, R.color.colorWhite))
actionSnackbar.cancelView = view.findViewById(R.id.image_view_action_cancel_quote) as ImageView actionSnackbar.parser = parser
actionSnackbar.duration = BaseTransientBottomBar.LENGTH_INDEFINITE actionSnackbar.messageTextView = text_view_action_text
val spannable = Markwon.markdown(context, content).trim() actionSnackbar.titleTextView = text_view_action_title
actionSnackbar.messageTextView.content = spannable actionSnackbar.cancelView = image_view_action_cancel_quote
actionSnackbar.duration = BaseTransientBottomBar.LENGTH_INDEFINITE
val spannable = Markwon.markdown(context, content).trim()
actionSnackbar.messageTextView.content = spannable
}
return actionSnackbar return actionSnackbar
} }
} }
...@@ -56,25 +65,22 @@ class ActionSnackbar : BaseTransientBottomBar<ActionSnackbar> { ...@@ -56,25 +65,22 @@ class ActionSnackbar : BaseTransientBottomBar<ActionSnackbar> {
title = "" title = ""
} }
private constructor(parentViewGroup: ViewGroup, content: View, contentViewCallback: BaseTransientBottomBar.ContentViewCallback) : class CallbackImpl(val content: View) : com.google.android.material.snackbar.ContentViewCallback {
super(parentViewGroup, content, contentViewCallback)
class CallbackImpl(val content: View) : BaseTransientBottomBar.ContentViewCallback {
override fun animateContentOut(delay: Int, duration: Int) { override fun animateContentOut(delay: Int, duration: Int) {
ViewCompat.setScaleY(content, 1f) content.scaleY = 1f
ViewCompat.animate(content) ViewCompat.animate(content)
.scaleY(0f) .scaleY(0f)
.setDuration(duration.toLong()) .setDuration(duration.toLong())
.startDelay = delay.toLong() .startDelay = delay.toLong()
} }
override fun animateContentIn(delay: Int, duration: Int) { override fun animateContentIn(delay: Int, duration: Int) {
ViewCompat.setScaleY(content, 0f) content.scaleY = 0f
ViewCompat.animate(content) ViewCompat.animate(content)
.scaleY(1f) .scaleY(1f)
.setDuration(duration.toLong()) .setDuration(duration.toLong())
.startDelay = delay.toLong() .startDelay = delay.toLong()
} }
} }
} }
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/actionMenuColor"
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorAccent" />
<size
android:width="4dp"
android:height="4dp" />
<corners android:radius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="@color/quoteBar" /> <solid android:color="@color/quoteBar" />
<size <size
android:width="4dp" android:width="4dp"
android:height="4dp" /> android:height="4dp" />
<corners android:radius="8dp" /> <corners android:radius="8dp" />
</shape> </shape>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
android:layout_width="4dp" android:layout_width="4dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="56dp" android:layout_marginStart="56dp"
android:background="@drawable/quote_vertical_bar" android:background="@drawable/quote_vertical_gray_bar"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/recycler_view_reactions"/> app:layout_constraintBottom_toTopOf="@+id/recycler_view_reactions"/>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
android:layout_width="4dp" android:layout_width="4dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="56dp" android:layout_marginStart="56dp"
android:background="@drawable/quote_vertical_bar" android:background="@drawable/quote_vertical_gray_bar"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycler_view_reactions"/> app:layout_constraintBottom_toTopOf="@id/recycler_view_reactions"/>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
android:layout_width="4dp" android:layout_width="4dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="56dp" android:layout_marginStart="56dp"
android:background="@drawable/quote_vertical_bar" android:background="@drawable/quote_vertical_gray_bar"
app:layout_constraintBottom_toTopOf="@+id/recycler_view_reactions" app:layout_constraintBottom_toTopOf="@+id/recycler_view_reactions"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
......
...@@ -4,15 +4,16 @@ ...@@ -4,15 +4,16 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/colorPrimary"> android:background="@color/colorWhite">
<View <View
android:id="@+id/quote_bar" android:id="@+id/quote_bar"
android:layout_width="4dp" android:layout_width="4dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@drawable/quote_vertical_bar"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginStart="8dp"
android:background="@drawable/quote_vertical_blue_bar"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/image_view_action_cancel_quote" app:layout_constraintStart_toEndOf="@+id/image_view_action_cancel_quote"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -21,17 +22,17 @@ ...@@ -21,17 +22,17 @@
android:id="@+id/text_view_action_text" android:id="@+id/text_view_action_text"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
android:textColor="@color/colorWhite" android:textColor="@color/actionMenuColor"
android:textSize="14sp" android:textSize="14sp"
android:typeface="normal" android:typeface="normal"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/image_view_action_cancel_quote" app:layout_constraintStart_toEndOf="@+id/quote_bar"
app:layout_constraintTop_toBottomOf="@+id/text_view_action_title" app:layout_constraintTop_toBottomOf="@+id/text_view_action_title"
tools:text="action text" /> tools:text="action text" />
...@@ -39,26 +40,29 @@ ...@@ -39,26 +40,29 @@
android:id="@+id/image_view_action_cancel_quote" android:id="@+id/image_view_action_cancel_quote"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:adjustViewBounds="true"
android:cropToPadding="true"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/quote_bar"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_close_white_24dp" /> app:srcCompat="@drawable/ic_close_gray_24dp" />
<TextView <TextView
android:id="@+id/text_view_action_title" android:id="@+id/text_view_action_title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textColor="@color/colorAccent" android:textColor="@color/colorAccent"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/text_view_action_text" app:layout_constraintBottom_toTopOf="@+id/text_view_action_text"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/image_view_action_cancel_quote" app:layout_constraintStart_toEndOf="@+id/quote_bar"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Edit message" /> tools:text="Edit message" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:src="@drawable/ic_arrow_downward_24dp" android:src="@drawable/ic_arrow_downward_24dp"
android:theme="@style/Theme.AppCompat" android:theme="@style/Theme.AppCompat"
android:tint="@color/gray_material" android:tint="@color/actionMenuColor"
android:visibility="invisible" android:visibility="invisible"
app:backgroundTint="@color/colorWhite" app:backgroundTint="@color/colorWhite"
app:fabSize="mini" app:fabSize="mini"
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="start" android:gravity="start"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/gray_material" android:textColor="@color/actionMenuColor"
android:textSize="14sp" android:textSize="14sp"
tools:text="Leave a channel" /> tools:text="Leave a channel" />
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/gray_material" android:textColor="@color/actionMenuColor"
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/text_username" app:layout_constraintStart_toEndOf="@+id/text_username"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_toEndOf="@+id/text_name" android:layout_toEndOf="@+id/text_name"
android:maxLines="1" android:maxLines="1"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:textColor="@color/gray_material" android:textColor="@color/actionMenuColor"
android:textSize="16sp" android:textSize="16sp"
tools:text="@tools:sample/full_names" /> tools:text="@tools:sample/full_names" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment