android-chat-ui
android-chat-ui copied to clipboard
clear input text
how to clear input text when click button send? it's not automaticly clear
this is my xml: <co.intentservice.chatui.ChatView android:id="@+id/chat_view" android:layout_width="match_parent" android:layout_height="match_parent" chatview:inputBackgroundColor="@color/white" chatview:inputUseEditorAction="false" chatview:inputTextSize="15dp" chatview:inputTextColor="@color/black" chatview:inputHint="Ketik Disini..." chatview:inputHintColor="@color/black" chatview:sendBtnIcon="@drawable/ic_menu_send" chatview:sendBtnBackgroundTint="@color/colorPrimary" chatview:sendBtnIconTint="@color/white" chatview:bubbleBackgroundRcv="@color/colorSecondary" chatview:bubbleBackgroundSend="@color/white" chatview:bubbleElevation="elevated" chatview:tStampTextColorRcv="@color/white" chatview:tStampTextColorSend="@color/white" chatview:messageTextColorRcv="@color/white" chatview:messageTextColorSend="@color/white"
/>
thank you
I have the same problem
hey guys, as i check the ChatView source code. You need to do it programmatically, call Chatview.clearMessage(); it will work
how to clear input text when click button send? it's not automaticly clear
this is my xml: <co.intentservice.chatui.ChatView android:id="@+id/chat_view" android:layout_width="match_parent" android:layout_height="match_parent" chatview:inputBackgroundColor="@color/white" chatview:inputUseEditorAction="false" chatview:inputTextSize="15dp" chatview:inputTextColor="@color/black" chatview:inputHint="Ketik Disini..." chatview:inputHintColor="@color/black" chatview:sendBtnIcon="@drawable/ic_menu_send" chatview:sendBtnBackgroundTint="@color/colorPrimary" chatview:sendBtnIconTint="@color/white" chatview:bubbleBackgroundRcv="@color/colorSecondary" chatview:bubbleBackgroundSend="@color/white" chatview:bubbleElevation="elevated" chatview:tStampTextColorRcv="@color/white" chatview:tStampTextColorSend="@color/white" chatview:messageTextColorRcv="@color/white" chatview:messageTextColorSend="@color/white"
/>
thank you
you can do it like this, chatView.getInputEditText().setText("");