2021-06-01 06:56:58 +02:00
|
|
|
package org.thoughtcrime.securesms.conversation.v2.messages
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import android.util.AttributeSet
|
|
|
|
import android.view.LayoutInflater
|
|
|
|
import android.widget.LinearLayout
|
|
|
|
import kotlinx.android.synthetic.main.view_voice_message.view.*
|
|
|
|
import network.loki.messenger.R
|
|
|
|
import org.thoughtcrime.securesms.database.model.MessageRecord
|
|
|
|
|
|
|
|
class VoiceMessageView : LinearLayout {
|
|
|
|
|
|
|
|
// region Lifecycle
|
|
|
|
constructor(context: Context) : super(context) {
|
|
|
|
setUpViewHierarchy()
|
|
|
|
}
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
|
|
|
setUpViewHierarchy()
|
|
|
|
}
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
|
|
|
|
setUpViewHierarchy()
|
|
|
|
}
|
|
|
|
|
|
|
|
private fun setUpViewHierarchy() {
|
2021-06-02 02:12:49 +02:00
|
|
|
LayoutInflater.from(context).inflate(R.layout.view_voice_message, this)
|
2021-06-01 06:56:58 +02:00
|
|
|
}
|
|
|
|
// endregion
|
|
|
|
|
|
|
|
// region Updating
|
|
|
|
fun bind(message: MessageRecord) {
|
|
|
|
textView.text = "I'm a voice message"
|
|
|
|
}
|
|
|
|
|
|
|
|
fun recycle() {
|
|
|
|
// TODO: Implement
|
|
|
|
}
|
|
|
|
// endregion
|
|
|
|
}
|