Search in sources :

Example 1 with SimpleAppsGridView

use of com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView in project XhsEmoticonsKeyboard by w446108264.

the class SimpleChatActivity method initEmoticonsKeyBoardBar.

private void initEmoticonsKeyBoardBar() {
    SimpleCommonUtils.initEmoticonsEditText(ekBar.getEtChat());
    ekBar.setAdapter(SimpleCommonUtils.getCommonAdapter(this, emoticonClickListener));
    ekBar.addOnFuncKeyBoardListener(this);
    ekBar.addFuncView(new SimpleAppsGridView(this));
    ekBar.getEtChat().setOnSizeChangedListener(new EmoticonsEditText.OnSizeChangedListener() {

        @Override
        public void onSizeChanged(int w, int h, int oldw, int oldh) {
            scrollToBottom();
        }
    });
    ekBar.getBtnSend().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            OnSendBtnClick(ekBar.getEtChat().getText().toString());
            ekBar.getEtChat().setText("");
        }
    });
    ekBar.getEmoticonsToolBarView().addFixedToolItemView(false, R.mipmap.icon_add, null, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SimpleChatActivity.this, "ADD", Toast.LENGTH_SHORT).show();
        }
    });
    ekBar.getEmoticonsToolBarView().addToolItemView(R.mipmap.icon_setting, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SimpleChatActivity.this, "SETTING", Toast.LENGTH_SHORT).show();
        }
    });
}
Also used : EmoticonsEditText(sj.keyboard.widget.EmoticonsEditText) SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) View(android.view.View) AbsListView(android.widget.AbsListView) SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) ListView(android.widget.ListView)

Example 2 with SimpleAppsGridView

use of com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView in project XhsEmoticonsKeyboard by w446108264.

the class SimpleCommonUtils method addTestPageSetEntity.

/**
     * 测试页集
     *
     * @param pageSetAdapter
     * @param context
     */
public static void addTestPageSetEntity(PageSetAdapter pageSetAdapter, Context context) {
    PageSetEntity pageSetEntity = new PageSetEntity.Builder().addPageEntity(new PageEntity(new SimpleAppsGridView(context))).setIconUri(ImageBase.Scheme.DRAWABLE.toUri("icon_kaomoji")).setShowIndicator(false).build();
    pageSetAdapter.add(pageSetEntity);
}
Also used : PageEntity(sj.keyboard.data.PageEntity) EmoticonPageEntity(sj.keyboard.data.EmoticonPageEntity) SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) SpannableStringBuilder(android.text.SpannableStringBuilder) PageSetEntity(sj.keyboard.data.PageSetEntity) EmoticonPageSetEntity(sj.keyboard.data.EmoticonPageSetEntity)

Example 3 with SimpleAppsGridView

use of com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView in project XhsEmoticonsKeyboard by w446108264.

the class SimpleChatOnCoordinatorLayoutActivity method initEmoticonsKeyBoardBar.

private void initEmoticonsKeyBoardBar() {
    SimpleCommonUtils.initEmoticonsEditText(ekBar.getEtChat());
    ekBar.setAdapter(SimpleCommonUtils.getCommonAdapter(this, null));
    ekBar.addOnFuncKeyBoardListener(this);
    ekBar.addFuncView(new SimpleAppsGridView(this));
    ekBar.setOnMaxParentHeightChangeListener(this);
    ekBar.getBtnSend().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            OnSendBtnClick(ekBar.getEtChat().getText().toString());
            ekBar.getEtChat().setText("");
        }
    });
    // TEST
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SimpleChatOnCoordinatorLayoutActivity.this, "TEST", Toast.LENGTH_SHORT).show();
        }
    });
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
    ekBar.getEmoticonsToolBarView().addToolItemView(com.keyboard.view.R.drawable.icon_face_nomal, null);
}
Also used : SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) AbsListView(android.widget.AbsListView) SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) View(android.view.View) ListView(android.widget.ListView)

Example 4 with SimpleAppsGridView

use of com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView in project XhsEmoticonsKeyboard by w446108264.

the class SimpleTranslucentChatActivity method initEmoticonsKeyBoardBar.

private void initEmoticonsKeyBoardBar() {
    SimpleCommonUtils.initEmoticonsEditText(ekBar.getEtChat());
    ekBar.setAdapter(SimpleCommonUtils.getCommonAdapter(this, emoticonClickListener));
    ekBar.addOnFuncKeyBoardListener(this);
    ekBar.addFuncView(new SimpleAppsGridView(this));
    ekBar.getEtChat().setOnSizeChangedListener(new EmoticonsEditText.OnSizeChangedListener() {

        @Override
        public void onSizeChanged(int w, int h, int oldw, int oldh) {
            scrollToBottom();
        }
    });
    ekBar.getBtnSend().setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            OnSendBtnClick(ekBar.getEtChat().getText().toString());
            ekBar.getEtChat().setText("");
        }
    });
    ekBar.getEmoticonsToolBarView().addFixedToolItemView(false, R.mipmap.icon_add, null, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SimpleTranslucentChatActivity.this, "ADD", Toast.LENGTH_SHORT).show();
        }
    });
    ekBar.getEmoticonsToolBarView().addToolItemView(R.mipmap.icon_setting, new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SimpleTranslucentChatActivity.this, "SETTING", Toast.LENGTH_SHORT).show();
        }
    });
}
Also used : EmoticonsEditText(sj.keyboard.widget.EmoticonsEditText) SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) View(android.view.View) AbsListView(android.widget.AbsListView) SimpleAppsGridView(com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView) ListView(android.widget.ListView)

Aggregations

SimpleAppsGridView (com.xhsemoticonskeyboard.common.widget.SimpleAppsGridView)4 View (android.view.View)3 AbsListView (android.widget.AbsListView)3 ListView (android.widget.ListView)3 EmoticonsEditText (sj.keyboard.widget.EmoticonsEditText)2 SpannableStringBuilder (android.text.SpannableStringBuilder)1 EmoticonPageEntity (sj.keyboard.data.EmoticonPageEntity)1 EmoticonPageSetEntity (sj.keyboard.data.EmoticonPageSetEntity)1 PageEntity (sj.keyboard.data.PageEntity)1 PageSetEntity (sj.keyboard.data.PageSetEntity)1