Skip to content
Snippets Groups Projects
Commit 75a17011 authored by Taras's avatar Taras
Browse files

Add background color to message input

parent 9a75a3d9
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,9 @@ import android.text.Editable
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import androidx.core.widget.doAfterTextChanged
import org.futo.circles.R
import org.futo.circles.core.extensions.getText
import org.futo.circles.core.extensions.setIsVisible
import org.futo.circles.databinding.ViewSendMessageBinding
......@@ -21,6 +23,12 @@ class SendMessageView(
private var sendDmMessageListener: SendDmMessageListener? = null
init {
setBackgroundColor(
ContextCompat.getColor(
context,
org.futo.circles.core.R.color.post_card_background_color
)
)
binding.etMessage.doAfterTextChanged { text: Editable? ->
binding.ivAddImage.setIsVisible(text.isNullOrBlank())
binding.ivSend.setIsVisible(text?.isNotBlank() == true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment