- more chat ui improvements
- new primary and accent colors - use color names in most drawables
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.tutpro.baresip
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.text.format.DateUtils.isToday
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -53,6 +55,10 @@ class ChatListAdapter(private val cxt: Context, private var rows: ArrayList<Mess
|
||||
}
|
||||
if (info.length < 6) info = "Today $info"
|
||||
infoView.text = "$info - $sender"
|
||||
if (message.direction == R.drawable.arrow_up_red) {
|
||||
infoView.text = "${infoView.text} - Message Delivery Failed"
|
||||
infoView.setTextColor(ContextCompat.getColor(cxt, R.color.colorAccent))
|
||||
}
|
||||
val textView = chatView.findViewById(R.id.text) as TextView
|
||||
textView.text = message.message
|
||||
if (message.new) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.tutpro.baresip
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Typeface
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.text.format.DateUtils.isToday
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -52,6 +53,10 @@ class MessageListAdapter(private val cxt: Context, private val rows: ArrayList<M
|
||||
}
|
||||
if (info.length < 6) info = "Today $info"
|
||||
infoView.text = "$info - $peer"
|
||||
if (message.direction == R.drawable.arrow_up_red) {
|
||||
infoView.text = "${infoView.text} - Message Delivery Failed"
|
||||
infoView.setTextColor(ContextCompat.getColor(cxt, R.color.colorAccent))
|
||||
}
|
||||
val textView = messageView.findViewById(R.id.text) as TextView
|
||||
textView.text = message.message
|
||||
if (message.new) textView.setTypeface(null, Typeface.BOLD)
|
||||
|
||||
Reference in New Issue
Block a user