How to remove a chat puzzle

I am learning about android chat, I see many examples of this, but I have no answers on how to remove the chat head with some event, I want to create a chat head like Facebook-messenger, many of examples of a floating window useful for me to create this, but someone please help me how to remove the chat head, for example in the Facebook messenger we will put the chat head at the bottom, one cross will automatically open at the bottom so we can delete chat-manager.

enter image description here

+3


source to share


1 answer


You just need to call

windowManager.removeView(yourView); 

      



to remove any view added as ChatHead. For the close button, you need to override the onTouch behavior. Although I don't have a ready-made sample for this, I suggest you pin the button to your Chathead. When the user clicks the close button, you can remove the view from the window manager

+3


source







All Articles