Chat new message view

Hi


I'm trying to add a simple chat system to my app but I'm encountering problems with the new message view. What I tried is to create a view at the bottom of the screen with a fixed height and inside it I tried to create a button to send the new message and a textview to insert the new message. I want a single line text view that auto increments the height and the lines when the message goes to a new line (like in whatsapp or messages).

The problems I encountered are:

1) if the keyboard is visible the view area is scrolled up but when I insert the first letter it disappears;

2) if i reset the constraints, problem one is resolved but the view is totally unaligned;

3) if i reset the constraints and add new lines, the text view increments the size but the view not.


So, have you any example to develop a solution like this?


Thanks