Skip to content
Advertisement

Change height for textedit depending on amount of text

So im trying to build chat and the textEdit where you write your message. I want to change height depending on amount of text.

a good thing to know also are that this is in a fragment.

Like in messenger or normal messaging apps.

Kotlin:

JavaScript

XML:

JavaScript

Advertisement

Answer

I fixed it by setting layout params every time the text changed to the params of the editText.

JavaScript
Advertisement