make popup menu respect the defined style definition by using the right context and referencing the style definition

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-14 13:26:13 +02:00
parent 39a848afa4
commit ed2f53bff4
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -56,6 +56,7 @@ import android.widget.RelativeLayout
import android.widget.Space
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.view.ContextThemeWrapper
import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory
import androidx.emoji.text.EmojiCompat
import androidx.emoji.widget.EmojiEditText
@ -1554,7 +1555,7 @@ class ChatController(args: Bundle) :
override fun onMessageViewLongClick(view: View?, message: IMessage?) {
PopupMenu(
this.context,
ContextThemeWrapper(view?.context, R.style.appActionBarPopupMenu),
view,
if (message?.user?.id == conversationUser?.userId) Gravity.END else Gravity.START
).apply {