mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-13 11:22:22 +00:00
Basic voice message
This commit is contained in:
@@ -103,7 +103,7 @@ class VisibleMessageContentView : LinearLayout {
|
||||
val hPadding = toPx(12, resources)
|
||||
result.setPadding(hPadding, vPadding, hPadding, vPadding)
|
||||
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.small_font_size))
|
||||
val uiMode = UiModeUtilities.getUserSelectedUiMode(context)
|
||||
val colorID = if (message.isOutgoing) {
|
||||
if (uiMode == UiMode.NIGHT) R.color.black else R.color.white
|
||||
|
||||
@@ -11,26 +11,18 @@ import org.thoughtcrime.securesms.database.model.MessageRecord
|
||||
class VoiceMessageView : LinearLayout {
|
||||
|
||||
// region Lifecycle
|
||||
constructor(context: Context) : super(context) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
constructor(context: Context) : super(context) { initialize() }
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { initialize() }
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { initialize() }
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
private fun setUpViewHierarchy() {
|
||||
private fun initialize() {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_voice_message, this)
|
||||
}
|
||||
// endregion
|
||||
|
||||
// region Updating
|
||||
fun bind(message: MessageRecord) {
|
||||
textView.text = "I'm a voice message"
|
||||
|
||||
}
|
||||
|
||||
fun recycle() {
|
||||
|
||||
Reference in New Issue
Block a user