setHint方法设置view为空时,view显示的内容,还有一个方法setHintTextColor()设置view为空时,view显示的内容的颜色
也可以在xml中设置
[img]http://dl.iteye.com/upload/attachment/459687/7571f3fe-1bf2-3485-a043-0f10e1f0ccca.png[/img]
同时还有个小提示,就是获得在xml中配置的LinearLayout,可以在代码中获得他的实例
R.id.checkBoxLayout这个参数也要在xml中配置LinearLayout的时候,进行配置
并不是异想天开的 你在
参考:http://mingkg21.iteye.com/blog/409862
也可以在xml中设置
android:hint="Hint Tip" [img]http://dl.iteye.com/upload/attachment/459687/7571f3fe-1bf2-3485-a043-0f10e1f0ccca.png[/img]
同时还有个小提示,就是获得在xml中配置的LinearLayout,可以在代码中获得他的实例
LinearLayout checkBoxLayout=(LinearLayout)findViewById(R.id.checkBoxLayout);R.id.checkBoxLayout这个参数也要在xml中配置LinearLayout的时候,进行配置
android:id="@+id/checkBoxLayout"并不是异想天开的 你在
setContentView(R.layout.checkbox);中的使用的这个变量,一个是layout,1个是id参考:http://mingkg21.iteye.com/blog/409862

1万+

被折叠的 条评论
为什么被折叠?



