forked from jpush/aurora-imui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
813 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...d/chatinput/src/main/java/cn/jiguang/imui/chatinput/listener/CustomMenuEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cn.jiguang.imui.chatinput.listener; | ||
|
||
|
||
import android.view.View; | ||
|
||
import java.util.List; | ||
|
||
import cn.jiguang.imui.chatinput.menu.view.MenuFeature; | ||
import cn.jiguang.imui.chatinput.menu.view.MenuItem; | ||
import cn.jiguang.imui.chatinput.model.FileItem; | ||
|
||
/** | ||
* Custom Menu' callbacks | ||
*/ | ||
public interface CustomMenuEventListener { | ||
|
||
boolean onMenuItemClick(String tag, MenuItem menuItem); | ||
|
||
void onMenuFeatureVisibilityChanged(int visibility,String tag,MenuFeature menuFeature); | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/menu/Menu.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package cn.jiguang.imui.chatinput.menu; | ||
|
||
|
||
public class Menu { | ||
|
||
public static final String TAG_VOICE = "voice"; | ||
public static final String TAG_GALLERY = "gallery"; | ||
public static final String TAG_CAMERA = "camera"; | ||
public static final String TAG_EMOJI = "emoji"; | ||
public static final String TAG_SEND = "send"; | ||
|
||
private final boolean customize; | ||
private final String[] left; | ||
private final String[] right; | ||
private final String[] bottom; | ||
|
||
private Menu(Builder builder) { | ||
this.customize = builder.customize; | ||
this.left = builder.left; | ||
this.right = builder.right; | ||
this.bottom = builder.bottom; | ||
} | ||
|
||
public boolean isCustomize() { | ||
return customize; | ||
} | ||
|
||
public String[] getLeft() { | ||
return left; | ||
} | ||
|
||
public String[] getRight() { | ||
return right; | ||
} | ||
|
||
public String[] getBottom() { | ||
return bottom; | ||
} | ||
|
||
public static Builder newBuilder(){ | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder{ | ||
private boolean customize; | ||
private String[] left; | ||
private String[] right; | ||
private String[] bottom; | ||
|
||
public Builder customize(boolean customize){ | ||
this.customize = customize; | ||
return this; | ||
} | ||
|
||
|
||
public Builder setLeft(String ... tags){ | ||
this.left =tags; | ||
return this; | ||
} | ||
|
||
public Builder setRight(String ... tags){ | ||
this.right =tags; | ||
return this; | ||
} | ||
|
||
public Builder setBottom(String ... tags){ | ||
this.bottom =tags; | ||
return this; | ||
} | ||
|
||
public Menu build(){ | ||
return new Menu(this); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.