我正在制作一个应用程序,它在预定的时间发送短信。日程表按钮执行日程安排功能。我有三个文本区域来获取用户输入。在按下日程表按钮后,我想用提示重新设置这些文本区域。所以,我已经定义了一个功能:setHint和setHintColor不起作用
public void resetInputFields() {
/**
* Resetting the text box to their initial values
*
* */
bdayMsg.setHint("Type your Message here..");
bdayMsg.setHintTextColor(R.color.text_grey);
phoneNum.setHint("Recipients..");
phoneNum.setHintTextColor(R.color.text_grey);
setBirthdayButton.setHint("Date");
setBirthdayButton.setHintTextColor(R.color.text_grey);
}
但setHint不产生影响,而它完美的作品,如果我做到以下几点:
ublic void resetInputFields() {
/**
* Resetting the text box to their initial values
*
* */
bdayMsg.setText("Type your Message here..");
bdayMsg.setTextColor(R.color.text_grey);
phoneNum.setText("Recipients..");
phoneNum.setTextColor(R.color.text_grey);
setBirthdayButton.setText("Date");
setBirthdayButton.setTextColor(R.color.text_grey);
}
那么我的主要问题是,我想重置我的文字区域提示不是文本...但我不能这样做....文本区域只会重置,如果我setText ....... 但我不能重置我的文本区域提示。 所以PLZ人帮我找出什么用的提示问题........
@ user102 ...我很抱歉,但我真的很困惑你想告诉我什么......我已经把文本放在里面“”.....你能澄清你的答案更多 – Prativa 2012-02-28 09:32:56
我editted我的答案 – Royi 2012-02-28 09:37:12
@ user102 ..我想你完全误解了我的问题.....问题其实是用setHint()而不是用setText() – Prativa 2012-02-28 09:38:31