在android中以编程方式设置编辑文本提示?

2022-01-14 00:00:00 android java android-edittext

有没有办法用 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");

希望对你有帮助..

相关文章