Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom menu API #453

Merged
merged 16 commits into from
Sep 11, 2018
Prev Previous commit
Next Next commit
Update sample
  • Loading branch information
JoshLipan committed Sep 10, 2018
commit 62eadcd8945d25c404261e4ac3e1362d3bef71aa
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import cn.jiguang.imui.chatinput.ChatInputView;
import cn.jiguang.imui.chatinput.listener.OnCameraCallbackListener;
Expand Down Expand Up @@ -90,7 +88,7 @@ public void initModule() {


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

// Custom menu order
mChatInput.getMenuManager().setMenu(Menu.newBuilder().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<TextView
android:id="@+id/menu_text_feature_tv"
android:layout_width="wrap_content"
android:textSize="50dp"
android:textSize="30dp"
android:layout_height="wrap_content"
android:text="TEXT"/>
android:text="CUSTOM MENU"/>

</cn.jiguang.imui.chatinput.menu.view.MenuFeature>