Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove chat-head android

i learn about android chat-head, i see many of example of it,but i not got answers of how to remove chat head using any event,i want to create chat-head like Facebook-messenger, many of example of floating-window useful to me to create that,but any one please help me to how to remove chat-head, for example in Facebook-messenger we put chat-head in bottom ,one cross automatic open in bottom through that we can remove chat-head.

enter image description here

like image 598
Nirav Mehta Avatar asked May 18 '26 00:05

Nirav Mehta


1 Answers

You need to simply call

windowManager.removeView(yourView); 

to remove whatever view has been added as a ChatHead. For the close button you need to override the onTouch behaviour. Although I don't have any ready sample for this but I would suggest you to make a close button on your Chathead . When the user clicks on the close button you can remove the view from window manager

like image 189
Ajit Pratap Singh Avatar answered May 20 '26 14:05

Ajit Pratap Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!