Android中为edittext预设文字(使用hint)

傻问题如下:

搜索框内有默认文字,在输入时消失,鼠标移出外面点击之后,如果搜索框内无文字,则变回默认文字,怎么做到的?

 

答案如下:

 android:hint="@string/search_hint"

  


 

猜你喜欢

转载自bbwang8088.iteye.com/blog/2034912
今日推荐