android widgets控件
2024-09-07 23:55:02
1.TextView
类似,C#里的lable,显示一段文本
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
2.Button
<Button
android:text="PDA"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/buttonPDA"
android:layout_weight="1"
/>
3.ToggleButton
点击按钮 OFF ON切换
<ToggleButton
android:id="@+id/toggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="ToggleButton" />
4.CheckBox
复选框
<CheckBox
android:id="@+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="CheckBox" />
5.RadioButton
单选框
<RadioButton
android:id="@+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="RadioButton" />
6.CheckedTextView
<CheckedTextView
android:id="@+id/checkedTextView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="多选风格"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
/>
<CheckedTextView
android:id="@+id/checkedTextView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="单选风格"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
/>
7.Spinner
下拉框
<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
8.ProgressBar
弧形进度条1
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
线型进度条2
<ProgressBar
android:id="@+id/progressBar3"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
9.SeekBar
滑动调节1
<SeekBar
android:id="@+id/seekBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
滑动调节2
<SeekBar
android:id="@+id/seekBar2"
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="10"
android:progress="3" />
10.QuickContactBadge
联系人
11.RatingBar
打分
<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
12.Switch
滑动开关
<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Switch" />
13.Space
最新文章
- AMD规范与CMD规范的区别是什么?
- ip地址合法性
- matplotlib 安装与使用
- SqlServer2008根据现有表,获取该表的分区创建脚本
- ajax 一个 gbk 目标后内容乱码的解决方案
- NLS_LANG SIMPLIFIED CHINESE_CHINA.AL32UTF8 和american_america.AL32UTF8
- SQL语句 我喜欢上海
- java====color、font、button、label、textfield、textarea使用
- 【转】iPhone X
- hive压缩
- Week Plan:强介入性的效率导师[转]
- Http请求中Content-Type讲解以及在Spring MVC注解中produce和consumes配置详解
- 【大数据系列】win10上安装hadoop开发环境
- j2ee高级开发技术课程第一周
- ubuntu workbench
- C++ Primer Plus学习:第十五章
- BZOJ2821 作诗(Poetize) 【分块】
- SQLserver 字符串分割函数
- cassandra 之 集群部署
- http://www.360doc.com/content/12/0516/14/1671317_211422841.shtml