编程设置编辑文本提示在android系统? [英] programmatically set edit text hint in android?

查看:101
本文介绍了编程设置编辑文本提示在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来设置与Java的机器人的EditText内显示的文本提示?我想为我的应用程序能够在不同时间的EditText上显示不同的事情,在此先感谢

is there a way to set the text hint displayed inside of an android edittext with java? I would like for my app to be able to display different things in the edittext at different times, thanks in advance

推荐答案

你有没有尝试<一个href=\"http://developer.android.com/reference/android/widget/TextView.html#setHint%28int%29\">setHint?

myTextView.setHint("My conditional hint");

希望它可以帮助..

Hope it helps..

这篇关于编程设置编辑文本提示在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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