- more chat ui improvements

- new primary and accent colors
- use color names in most drawables
This commit is contained in:
Juha Heinanen
2019-03-12 07:00:55 +02:00
parent 5abcb98a67
commit 16521106a3
20 changed files with 47 additions and 33 deletions
@@ -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)