android-chat-ui icon indicating copy to clipboard operation
android-chat-ui copied to clipboard

clear input text

Open arifpermadi999 opened this issue 5 years ago • 3 comments

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"

/>

image

thank you

arifpermadi999 avatar Jul 08 '19 04:07 arifpermadi999

I have the same problem

rihardi354 avatar Feb 22 '20 12:02 rihardi354

hey guys, as i check the ChatView source code. You need to do it programmatically, call Chatview.clearMessage(); it will work

nickyrabit avatar Mar 06 '20 18:03 nickyrabit

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"

/>

image

thank you

you can do it like this, chatView.getInputEditText().setText("");

samiullah225 avatar Jun 17 '20 19:06 samiullah225