Minor tweaks

This commit is contained in:
Niels Andriesse 2021-06-16 11:21:58 +10:00
parent c6cadf8d35
commit bf25a44f7b
2 changed files with 6 additions and 2 deletions

View File

@ -48,7 +48,8 @@ class InputBarButton : RelativeLayout {
result.layoutParams = LayoutParams(size, size) result.layoutParams = LayoutParams(size, size)
result.scaleType = ImageView.ScaleType.CENTER_INSIDE result.scaleType = ImageView.ScaleType.CENTER_INSIDE
result.setImageResource(iconID) result.setImageResource(iconID)
result.imageTintList = ColorStateList.valueOf(resources.getColorWithID(R.color.text, context.theme)) val colorID = if (isSendButton) R.color.black else R.color.text
result.imageTintList = ColorStateList.valueOf(resources.getColorWithID(colorID, context.theme))
result result
} }

View File

@ -21,6 +21,7 @@ import org.thoughtcrime.securesms.database.model.MmsMessageRecord
import org.thoughtcrime.securesms.loki.utilities.UiMode import org.thoughtcrime.securesms.loki.utilities.UiMode
import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities
import org.thoughtcrime.securesms.loki.utilities.getColorWithID import org.thoughtcrime.securesms.loki.utilities.getColorWithID
import org.thoughtcrime.securesms.loki.utilities.toPx
import java.lang.IllegalStateException import java.lang.IllegalStateException
class VisibleMessageContentView : LinearLayout { class VisibleMessageContentView : LinearLayout {
@ -103,7 +104,9 @@ class VisibleMessageContentView : LinearLayout {
// region Convenience // region Convenience
private fun getBodyTextView(message: MessageRecord): TextView { private fun getBodyTextView(message: MessageRecord): TextView {
val result = TextView(context) val result = TextView(context)
result.setPadding(resources.getDimension(R.dimen.small_spacing).toInt()) val vPadding = resources.getDimension(R.dimen.small_spacing).toInt()
val hPadding = toPx(12, resources)
result.setPadding(hPadding, vPadding, hPadding, vPadding)
result.text = message.body result.text = message.body
result.setTextSize(TypedValue.COMPLEX_UNIT_PX, resources.getDimension(R.dimen.medium_font_size)) result.setTextSize(TypedValue.COMPLEX_UNIT_PX, resources.getDimension(R.dimen.medium_font_size))
val uiMode = UiModeUtilities.getUserSelectedUiMode(context) val uiMode = UiModeUtilities.getUserSelectedUiMode(context)