diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/Reaction.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/Reaction.kt
index 2e38b9bb3..15ab41897 100644
--- a/app/src/main/java/com/nextcloud/talk/adapters/messages/Reaction.kt
+++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/Reaction.kt
@@ -25,11 +25,11 @@ import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
+import androidx.emoji2.widget.EmojiTextView
import com.nextcloud.talk.databinding.ReactionsInsideMessageBinding
import com.nextcloud.talk.models.json.chat.ChatMessage
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.DisplayUtils
-import com.vanniktech.emoji.EmojiTextView
class Reaction {
diff --git a/app/src/main/java/com/nextcloud/talk/call/ReactionAnimator.kt b/app/src/main/java/com/nextcloud/talk/call/ReactionAnimator.kt
index 746644b8c..3db27ece3 100644
--- a/app/src/main/java/com/nextcloud/talk/call/ReactionAnimator.kt
+++ b/app/src/main/java/com/nextcloud/talk/call/ReactionAnimator.kt
@@ -35,9 +35,10 @@ import android.widget.TextView
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
+import androidx.emoji2.widget.EmojiTextView
import com.nextcloud.talk.R
import com.nextcloud.talk.ui.theme.ViewThemeUtils
-import com.vanniktech.emoji.EmojiTextView
+
class ReactionAnimator(
val context: Context,
diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt
index 1cd258656..38d1ebea1 100644
--- a/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt
+++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt
@@ -25,13 +25,12 @@ package com.nextcloud.talk.ui.dialog
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
import android.util.Log
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
+import androidx.emoji2.widget.EmojiTextView
import autodagger.AutoInjector
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
@@ -49,10 +48,6 @@ import com.nextcloud.talk.models.json.chat.ChatMessage
import com.nextcloud.talk.repositories.reactions.ReactionsRepository
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew
-import com.vanniktech.emoji.EmojiPopup
-import com.vanniktech.emoji.EmojiTextView
-import com.vanniktech.emoji.installDisableKeyboardInput
-import com.vanniktech.emoji.installForceSingleEmoji
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -78,7 +73,7 @@ class MessageActionsDialog(
private lateinit var dialogMessageActionsBinding: DialogMessageActionsBinding
- private lateinit var popup: EmojiPopup
+ // private lateinit var popup: EmojiPopup
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -146,28 +141,10 @@ class MessageActionsDialog(
true
}
- popup = EmojiPopup(
- rootView = dialogMessageActionsBinding.root,
- editText = dialogMessageActionsBinding.emojiMore,
- onEmojiPopupShownListener = {
- dialogMessageActionsBinding.emojiMore.clearFocus()
- dialogMessageActionsBinding.messageActions.visibility = View.GONE
- },
- onEmojiClickListener = {
- popup.dismiss()
- clickOnEmoji(message, it.unicode)
- },
- onEmojiPopupDismissListener = {
- dialogMessageActionsBinding.emojiMore.clearFocus()
- dialogMessageActionsBinding.messageActions.visibility = View.VISIBLE
-
- val imm: InputMethodManager = context.getSystemService(Context.INPUT_METHOD_SERVICE) as
- InputMethodManager
- imm.hideSoftInputFromWindow(dialogMessageActionsBinding.emojiMore.windowToken, 0)
- }
- )
- dialogMessageActionsBinding.emojiMore.installDisableKeyboardInput(popup)
- dialogMessageActionsBinding.emojiMore.installForceSingleEmoji()
+ dialogMessageActionsBinding.emojiMore.setOnClickListener { toggleEmojiPopup()}
+ dialogMessageActionsBinding.emojiPicker.setOnEmojiPickedListener(){
+ clickOnEmoji(message, it.emoji)
+ }
}
/*
@@ -176,18 +153,9 @@ class MessageActionsDialog(
it is closed after some milliseconds and opened again.
*/
private fun toggleEmojiPopup() {
- if (popup.isShowing) {
- popup.dismiss()
- } else {
- popup.show()
- Handler(Looper.getMainLooper()).postDelayed(
- {
- popup.dismiss()
- popup.show()
- },
- DELAY
- )
- }
+ val imm: InputMethodManager = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
+ imm.hideSoftInputFromWindow(dialogMessageActionsBinding.emojiMore.windowToken, 0)
+ dialogMessageActionsBinding.emojiPicker.visibility = View.VISIBLE
}
private fun initEmojiBar(hasChatPermission: Boolean) {
@@ -431,6 +399,7 @@ class MessageActionsDialog(
}
}
+
companion object {
private val TAG = MessageActionsDialog::class.java.simpleName
private const val ACTOR_LENGTH = 6
diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/MoreCallActionsDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/MoreCallActionsDialog.kt
index 73f4a6cbb..dd6ab7094 100644
--- a/app/src/main/java/com/nextcloud/talk/ui/dialog/MoreCallActionsDialog.kt
+++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/MoreCallActionsDialog.kt
@@ -26,6 +26,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.core.content.ContextCompat
+import androidx.emoji2.widget.EmojiTextView
import autodagger.AutoInjector
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
@@ -37,7 +38,6 @@ import com.nextcloud.talk.raisehand.viewmodel.RaiseHandViewModel
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew
import com.nextcloud.talk.viewmodels.CallRecordingViewModel
-import com.vanniktech.emoji.EmojiTextView
import javax.inject.Inject
@AutoInjector(NextcloudTalkApplication::class)
diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt
index 523e2c068..51fa074c9 100644
--- a/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt
+++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt
@@ -63,7 +63,6 @@ import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.DisplayUtils
import com.nextcloud.talk.utils.database.user.CurrentUserProviderNew
-import com.vanniktech.emoji.EmojiPopup
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -106,7 +105,6 @@ class SetStatusDialogFragment : DialogFragment(), PredefinedStatusClickListener
private lateinit var adapter: PredefinedStatusListAdapter
private var clearAt: Long? = null
- private lateinit var popup: EmojiPopup
@Inject
lateinit var ncApi: NcApi
diff --git a/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt b/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt
index 5a06acef8..99faa5efc 100644
--- a/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt
+++ b/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt
@@ -48,6 +48,7 @@ import androidx.core.content.res.ResourcesCompat
import androidx.core.graphics.ColorUtils
import androidx.core.graphics.drawable.DrawableCompat
import androidx.core.view.ViewCompat
+import androidx.emoji2.widget.EmojiTextView
import com.google.android.material.button.MaterialButton
import com.google.android.material.card.MaterialCardView
import com.google.android.material.materialswitch.MaterialSwitch
@@ -62,7 +63,6 @@ import com.nextcloud.talk.ui.WaveformSeekBar
import com.nextcloud.talk.utils.DisplayUtils
import com.nextcloud.talk.utils.DrawableUtils
import com.nextcloud.talk.utils.message.MessageUtils
-import com.vanniktech.emoji.EmojiTextView
import com.wooplr.spotlight.SpotlightView
import eu.davidea.flexibleadapter.utils.FlexibleUtils
import javax.inject.Inject
diff --git a/app/src/main/res/layout/dialog_create_conversation.xml b/app/src/main/res/layout/dialog_create_conversation.xml
index 7fa93ac9e..4fce6dcee 100644
--- a/app/src/main/res/layout/dialog_create_conversation.xml
+++ b/app/src/main/res/layout/dialog_create_conversation.xml
@@ -65,4 +65,13 @@
app:tint="@color/medium_emphasis_text"
tools:visibility="visible" />
+
+
+
diff --git a/app/src/main/res/layout/dialog_message_actions.xml b/app/src/main/res/layout/dialog_message_actions.xml
index b34b75a74..c7a79e13b 100644
--- a/app/src/main/res/layout/dialog_message_actions.xml
+++ b/app/src/main/res/layout/dialog_message_actions.xml
@@ -26,6 +26,15 @@
android:orientation="vertical"
android:paddingBottom="@dimen/standard_half_padding">
+
+
+
+
-
-
-
-
-
-
-
-