安卓:我怎样才能得到的EditText变化? [英] Android: How can I get EditText change?

查看:103
本文介绍了安卓:我怎样才能得到的EditText变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个EditText上,我想告诉每一次的文字变化(与进入每个字符)。怎么实现,我应该用我应该覆盖什么功能?

I have a EditText and I want to inform each time text changes (with entering each character). What implementation should I use and what function should I override?

感谢

推荐答案

使用您的EditText的addTextChangedListener方法,让你的类实现或定义一个内部类实现TextWatcher类:

Use the addTextChangedListener method on your EditText and make your class implement or define an inner class implementing the TextWatcher class:

<一个href="http://developer.android.com/intl/fr/reference/android/widget/TextView.html#addTextChangedListener(android.text.TextWatcher">http://developer.android.com/intl/fr/reference/android/widget/TextView.html#addTextChangedListener(android.text.TextWatcher)

这篇关于安卓:我怎样才能得到的EditText变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆