使用Xamarin.Android-Emojicon更改弹出颜色

时间:2018-09-08 23:39:58

标签: xamarin.android

我正在尝试使用EmojiIcon

使用我的xamarin.Android应用程序,按照提供的设置指南进行操作,似乎一切正常,但是有什么方法可以更改表情符号弹出窗口的背景颜色,它显示为黑色背景,我需要对其进行更改以匹配whatsapp

预先感谢

enter image description here

这是我在片段中的实现

  private void SetupEmojiconPopup(View viewFragment)
        {
            _emojiconPopup = new EmojiconsPopup(viewFragment, Activity);
             _emojiconPopup.SetSizeForSoftKeyboard();
            _emojiconPopup.SetBackgroundDrawable(null);

            _emojiconPopup.EmojiconClicked += (sender, args) =>
            {
                _emojiconEditText.Append(args.P0.Emoji);
            };

            _emojiconPopup.EmojiconBackspaceClicked += (sender, args) =>
            {
                var keyEvent = new KeyEvent(0, 0, 0, Android.Views.Keycode.Del, 0, 0, 0, (int)Android.Views.Keycode.Endcall);
                _emojiconEditText.DispatchKeyEvent(keyEvent);
            };


            _emojiconPopup.DismissEvent += (sender, args) =>
            {

            };

            _emojiconPopup.KeyboardClose += (sender, args) =>
            {
                if (_emojiconPopup.IsShowing)
                {
                    _emojiconPopup.Dismiss();
                }
            };
        }

在Emojicon btn上单击

 private void _mEmojiBtn_Click(object sender, EventArgs e)
        {

            //Show, Close Emoji Keyboard
            if (!_emojiconPopup.IsShowing)
            {

                if (_emojiconPopup.IsKeyBoardOpen().BooleanValue())
                {

                    _emojiconPopup.ShowAtBottom();

            }
                else
                {

                    _emojiconEditText.FocusableInTouchMode = true;
                    _emojiconEditText.RequestFocus();
                    _emojiconPopup.ShowAtBottomPending();

                    var inputMethodManager = Activity.GetSystemService(Context.InputMethodService) as InputMethodManager;
                     inputMethodManager.ShowSoftInput(_emojiconEditText, Android.Views.InputMethods.ShowFlags.Implicit);
                 }

            }
            else
            {

                _emojiconPopup.Dismiss();
            }
        }

0 个答案:

没有答案