applying the selected text size on a couple places

This commit is contained in:
tibbi 2020-11-04 12:53:24 +01:00
parent 82f78f002e
commit d49eaa4abe
2 changed files with 12 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import android.os.Bundle
import android.provider.Telephony
import android.telephony.SubscriptionManager
import android.text.TextUtils
import android.util.TypedValue
import android.view.*
import android.view.inputmethod.EditorInfo
import android.widget.LinearLayout
@ -263,8 +264,11 @@ class ThreadActivity : SimpleActivity() {
thread_send_message.applyColorFilter(textColor)
confirm_manage_contacts.applyColorFilter(textColor)
thread_add_attachment.applyColorFilter(textColor)
thread_character_counter.beVisibleIf(config.showCharacterCounter)
thread_character_counter.beVisibleIf(config.showCharacterCounter)
thread_character_counter.setTextSize(TypedValue.COMPLEX_UNIT_PX, getTextSize())
thread_type_message.setTextSize(TypedValue.COMPLEX_UNIT_PX, getTextSize())
thread_send_message.setOnClickListener {
sendMessage()
}

View File

@ -38,6 +38,7 @@ import kotlinx.android.synthetic.main.item_received_message.view.*
import kotlinx.android.synthetic.main.item_received_unknown_attachment.view.*
import kotlinx.android.synthetic.main.item_sent_unknown_attachment.view.*
import kotlinx.android.synthetic.main.item_thread_date_time.view.*
import kotlinx.android.synthetic.main.item_thread_error.view.*
import kotlinx.android.synthetic.main.item_thread_success.view.*
class ThreadAdapter(activity: SimpleActivity, var messages: ArrayList<ThreadItem>, recyclerView: MyRecyclerView, fastScroller: FastScroller,
@ -105,7 +106,8 @@ class ThreadAdapter(activity: SimpleActivity, var messages: ArrayList<ThreadItem
when (item) {
is ThreadDateTime -> setupDateTime(itemView, item)
is ThreadSuccess -> setupThreadSuccess(itemView)
!is ThreadError -> setupView(itemView, item as Message)
is ThreadError -> setupThreadError(itemView)
else -> setupView(itemView, item as Message)
}
}
bindViewHolder(holder)
@ -322,4 +324,8 @@ class ThreadAdapter(activity: SimpleActivity, var messages: ArrayList<ThreadItem
private fun setupThreadSuccess(view: View) {
view.thread_success.applyColorFilter(textColor)
}
private fun setupThreadError(view: View) {
view.thread_error.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize)
}
}