2015-09-17 6 views
0

У меня есть пример Emoji Keyboard. Как создать всплывающее представление выглядит как emojiconView в softkeyboardКак сделать эффективное всплывающее окно для emojicon?

У меня есть другой проект. Я создаю всплывающее окно так же, как в Dot dash Keyboard Как реализовать правильный вид emoji в softkeyboard.

См:

EmojiView

Но мое мнение см:

simaplepopup

Как управлять этой точки зрения в SoftKeyboard.

Edit 1: Код

public void createCheatSheet() { 
     LayoutInflater inflater = (LayoutInflater) service.getSystemService(Service.LAYOUT_INFLATER_SERVICE); 
     ViewGroup viewGrop = null; 
     if (this.gridView == null) { 
      emojiTextView = new EmojiconTextView(getContext()); 
      // this.gridView = 
      // this.service.getLayoutInflater().inflate(R.layout.cheatsheet2, 
      // null); 
      LinearLayout l = (LinearLayout) this.service.getLayoutInflater().inflate(R.layout.cheatsheet2, null); 
      l.addView(emojiTextView); 
      viewGrop = (ViewGroup) inflater.inflate(R.layout.linearlayout, l, true); 

     } 
     if (emojiTextView == null) { 
      // this.gridView = 
      // this.service.getLayoutInflater().inflate(R.layout.cheatsheet1, 
      // null); 
      // emojiTextView = (EmojiconTextView) 
      // gridView.findViewById(R.id.Emoji_GridView); 

     } 

     if (this.popupDialog == null) { 
      this.popupDialog = new Dialog(this.service); 

      popupDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); 

      popupDialog.setCancelable(true); 
      // FrameLayout boatlayout = new FrameLayout(this.service); 
      // emojiTextView = (EmojiconTextView) 
      // gridView.findViewById(R.id.Emoji_GridView); 
      // 
      // FrameLayout.LayoutParams params = new 
      // FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, 
      // LayoutParams.MATCH_PARENT); 
      // boatlayout.addView(emojiTextView, params); 
      // RelativeLayout.LayoutParams parentParams = new 
      // RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, 
      // LayoutParams.WRAP_CONTENT); 
      // popupDialog.addContentView(boatlayout, parentParams); 
      popupDialog.setCanceledOnTouchOutside(true); 
      popupDialog.setContentView(viewGrop); 
      // popupDialog.addContentView(emojiTextView, params); 

      // emojiTextView.setOnTouchListener(new OnTouchListener() { 
      // @Override 
      // public boolean onTouch(View v, MotionEvent event) { 
      // Toast.makeText(getContext(), "onclick", 
      // Toast.LENGTH_LONG).show(); 
      // return true; 
      // } 
      // }); 
      PopupWindow window = new PopupWindow(gridView, 200, 200); 
//   Window window = this.popupDialog.getWindow(); 
      WindowManager.LayoutParams lp = window.getAttributes(); 
      lp.token = this.getWindowToken(); 
      lp.type = WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG; 
      window.setAttributes(lp); 

      window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); 
     } 
    } 

Спасибо за заранее. Пожалуйста, поделитесь своим кодом.

ответ

1

Вы следовать этой ссылки:

How to draw view on top of soft keyboard like WhatsApp?

вы являетесь разработчиком, но не имеют функциональных возможностей. Вы создаете пользовательский вид для клавиатуры, и вы следуете этому проекту.

AnySoftKeyboard

https://github.com/AnySoftKeyboard/AnySoftKeyboard

https://github.com/zeuxisoo/android-emoji-keyboard

https://code.google.com/p/indic-keyboards/

+0

я уже проверить эти ссылки, но я хочу дополнительной –

+1

вы хороший разработчик. Я предлагаю вам и следить за всем проектом, пожалуйста, глубоко поймите, что внутри всего проекта вы изучаете хороший материал. –

Смежные вопросы