摘要: RadioButton和CheckBox的区别:CheckBox选中之后可以直接取消,RadioButton选中之后不能直接取消,所以一般情况下不建议单独使用。1.RadioGroup:RadioButton的一个集合,提供多选一机制。2.属性:android:orientation ("verti 阅读全文
posted @ 2016-04-17 22:02 月光诗人 阅读(1167) 评论(0) 推荐(0) 编辑
摘要: CheckBox:复选框1.有两种状态: 选中状态(true),未选中状态(false)2.属性: android:id="@+id/checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content"  阅读全文
posted @ 2016-04-17 21:20 月光诗人 阅读(8906) 评论(0) 推荐(0) 编辑
摘要: 1.什么是ToggleButtonToggleButton有两种状态:选中和未选中状态并且需要为不同的状态设置不同的显示文本2.ToggleButton属性android:checked="true"android:textOff="关"android:textOn="开" 使用ToggleButt 阅读全文
posted @ 2016-04-17 18:11 月光诗人 阅读(895) 评论(0) 推荐(0) 编辑
摘要: AutoCompleteTextView1.功能:动态匹配输入的内容,如百度搜索引擎当输入文本时可以根据内容显示匹配的热门信息。2.独特属性:android:completionThreshold 设置输入多少字符时自动匹配 使用AutoCOmpleteTextView实现自动匹配输入的内容priv 阅读全文
posted @ 2016-04-17 16:25 月光诗人 阅读(477) 评论(0) 推荐(0) 编辑
摘要: TextView实现跑马灯的效果:例子一: 这个例子可以解决给一个TextView实现跑马灯的效果,但是不能解决给所有的TextView实现跑马灯的效果。 但是这种方法在有两个TextView的时候不能给两个TextView同时实现跑马灯的效果。原因是:TextView默认的isFocused()方 阅读全文
posted @ 2016-04-17 15:02 月光诗人 阅读(958) 评论(0) 推荐(0) 编辑
摘要: onClick事件1.Button和ImageButton都拥有一个onClick事件 通过自身的.setOnClickListener(OnClickListener)方法添加点击事件2.所有的控件都有一个onclick事件 不仅仅Button和ImageButton拥有3.通过点击事件的监听可以 阅读全文
posted @ 2016-04-17 14:03 月光诗人 阅读(810) 评论(0) 推荐(0) 编辑