Kostek
Kostek

Reputation: 282

Overlay layout (messenger-like chat bubbles) exit layout on ACTION_MOVE

recently I developed application following this tutorial: https://medium.com/exploring-code/create-chat-heads-like-facebook-messenger-32f7f1a62064

What it doesn't cover is how do you implement "exit layout" being drew at the bottom - middle. It works this way - if you drag your overlay layout on top of this "exit layout" it vibrates and upon ACTION_DOWN it stops the service that is responsible for drawing overlay layout. I've found exactly the same "exit layout" in other apps than Messenger, so I wonder maybe it is drew by system?

Two extra questions:

1) I was not able to draw my layout with negative X value (which would result with a effect that feels like overlay layout is really glued to the left or right edge of the screen (negative margin) - any ideas on that one?

2) In order to make overlay layout working I had to change the target API from 27 to 25 along with BuildSystem - I am wondering what could be the possible downside of this 'workaround'. Maybe there is better solution for that one?

Thanks for all the responses!

Upvotes: 0

Views: 922

Answers (1)

Kostek
Kostek

Reputation: 282

I achieved the no 1. by manipulating x value of the layout view (negative value for glueing to the left edge, positive value for glueing to the right edge).

Upvotes: 0

Related Questions