简体   繁体   中英

Edittext text input listener

Am developing an android chat application. Everything works well but except for one thing; I want to set the visibility of a layout to gone and then set a different layout to visible when user starts typing in the edittext like the one implemented on whatsapp. But I cant seem to figure it out. Any help will be appreciated

Basically, what I want to do is set the visibility of a layout which contains an image button to upload image to gone and then show a layout which contains an image button to send the message or text in the edittext to visible when the user starts typing

Can you explain in detail? Do you wan edit text to come up when keyboard is hoped up. then use below in your manifest.

<activity
        android:name=".Activityname"

        android:windowSoftInputMode="adjustPan">

If not, then please explain your question in more detail

Take a look at the TextChangedListener . With help of the TextWatcher you should be able to run commands when the input changes.

Please describe in more detail, if you need further assistance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM