3

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

Nirav Mehta
  • 1,715
  • 4
  • 23
  • 42

1 Answers1

3

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

Ajit Pratap Singh
  • 1,299
  • 12
  • 24