在android中以编程方式设置编辑文本提示? [英] programmatically set edit text hint in android?

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

问题描述

有没有办法用 java 设置在 android 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

推荐答案

你试过setHint?

myTextView.setHint("My conditional hint");

希望对你有帮助..

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

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