-
Notifications
You must be signed in to change notification settings - Fork 145
Getting Started
Tsubasa Nakayama edited this page May 13, 2017
·
2 revisions
How to setup for using this library.
Add this to your app build.gradle
dependencies {
compile 'com.github.bassaer:chatmessageview:x.x.x'
}
There are 2 type of views.
View | Detail |
---|---|
MessageView | MessageView is a simple chat UI. There is no input functions. |
ChatView | ChatView is a chat UI which contains edit text, send button, and option button. |
Define it in your xml file.
- MessageView
<com.github.bassaer.chatmessageview.views.MessageView
android:id="@+id/message_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
- ChatView
<com.github.bassaer.chatmessageview.views.ChatView
android:id="@+id/chat_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
And then call from your Activity or Fragment.
- MessageView
MessageView messageView = (MessageView) findViewById(R.id.message_view);
- ChatView
ChatView chatView = (ChatView) findViewById(R.id.chat_view);