Skip to content

Commit

Permalink
Update sample
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLipan committed Sep 11, 2018
1 parent 322942c commit 199ae68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import cn.jiguang.imui.chatinput.listener.OnMenuClickListener;
import cn.jiguang.imui.chatinput.listener.RecordVoiceListener;
import cn.jiguang.imui.chatinput.menu.Menu;
import cn.jiguang.imui.chatinput.menu.MenuManager;
import cn.jiguang.imui.chatinput.menu.view.MenuFeature;
import cn.jiguang.imui.chatinput.menu.view.MenuItem;
import cn.jiguang.imui.chatinput.record.RecordVoiceButton;
Expand Down Expand Up @@ -88,15 +89,16 @@ public void initModule() {


// add Custom Menu View
mChatInput.getMenuManager().addCustomMenu("MY_CUSTOM",R.layout.menu_text_item,R.layout.menu_text_feature);
MenuManager menuManager = mChatInput.getMenuManager();
menuManager.addCustomMenu("MY_CUSTOM",R.layout.menu_text_item,R.layout.menu_text_feature);

// Custom menu order
mChatInput.getMenuManager().setMenu(Menu.newBuilder().
menuManager.setMenu(Menu.newBuilder().
customize(true).
setRight(Menu.TAG_SEND).
setBottom(Menu.TAG_VOICE,Menu.TAG_EMOJI,Menu.TAG_GALLERY,Menu.TAG_CAMERA,"MY_CUSTOM").
build());
mChatInput.setCustomMenuClickListener(new CustomMenuEventListener() {
menuManager.setCustomMenuClickListener(new CustomMenuEventListener() {
@Override
public boolean onMenuItemClick(String tag, MenuItem menuItem) {
//Menu feature will not be show shown if return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<cn.jiguang.imui.chatinput.menu.view.MenuItem xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:orientation="vertical"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
Expand Down

0 comments on commit 199ae68

Please sign in to comment.