Fix emoji keyboard orientation bug.
This commit is contained in:
parent
e8862b3aaa
commit
08964d8548
|
@ -53,7 +53,6 @@ import androidx.lifecycle.Observer
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
|
||||||
import com.airbnb.epoxy.EpoxyModel
|
import com.airbnb.epoxy.EpoxyModel
|
||||||
import com.airbnb.epoxy.OnModelBuildFinishedListener
|
import com.airbnb.epoxy.OnModelBuildFinishedListener
|
||||||
import com.airbnb.epoxy.addGlidePreloader
|
import com.airbnb.epoxy.addGlidePreloader
|
||||||
|
@ -290,15 +289,11 @@ class RoomDetailFragment @Inject constructor(
|
||||||
private lateinit var attachmentsHelper: AttachmentsHelper
|
private lateinit var attachmentsHelper: AttachmentsHelper
|
||||||
private lateinit var keyboardStateUtils: KeyboardStateUtils
|
private lateinit var keyboardStateUtils: KeyboardStateUtils
|
||||||
|
|
||||||
@BindView(R.id.composerLayout)
|
|
||||||
lateinit var composerLayout: TextComposerView
|
|
||||||
private lateinit var attachmentTypeSelector: AttachmentTypeSelectorView
|
private lateinit var attachmentTypeSelector: AttachmentTypeSelectorView
|
||||||
|
|
||||||
private var lockSendButton = false
|
private var lockSendButton = false
|
||||||
private val activeCallViewHolder = ActiveCallViewHolder()
|
private val activeCallViewHolder = ActiveCallViewHolder()
|
||||||
|
|
||||||
private lateinit var emojiPopup: EmojiPopup
|
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
||||||
|
@ -483,16 +478,13 @@ class RoomDetailFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupEmojiPopup() {
|
private fun setupEmojiPopup() {
|
||||||
EmojiPopup
|
val emojiPopup = EmojiPopup
|
||||||
.Builder
|
.Builder
|
||||||
.fromRootView(rootConstraintLayout)
|
.fromRootView(rootConstraintLayout)
|
||||||
.setKeyboardAnimationStyle(R.style.emoji_fade_animation_style)
|
.setKeyboardAnimationStyle(R.style.emoji_fade_animation_style)
|
||||||
.setOnEmojiPopupShownListener { composerLayout.composerEmojiButton.setImageResource(R.drawable.ic_keyboard) }
|
.setOnEmojiPopupShownListener { composerLayout?.composerEmojiButton?.setImageResource(R.drawable.ic_keyboard) }
|
||||||
.setOnEmojiPopupDismissListener { composerLayout.composerEmojiButton.setImageResource(R.drawable.ic_insert_emoji) }
|
.setOnEmojiPopupDismissListener { composerLayout?.composerEmojiButton?.setImageResource(R.drawable.ic_insert_emoji) }
|
||||||
.build(composerLayout.composerEditText)
|
.build(composerLayout.composerEditText)
|
||||||
.also {
|
|
||||||
emojiPopup = it
|
|
||||||
}
|
|
||||||
|
|
||||||
composerLayout.composerEmojiButton.debouncedClicks {
|
composerLayout.composerEmojiButton.debouncedClicks {
|
||||||
emojiPopup.toggle()
|
emojiPopup.toggle()
|
||||||
|
|
Loading…
Reference in New Issue