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

android widgets控件的更多相关文章

  1. Android 开源控件与常用开发框架开发工具类

    Android的加载动画AVLoadingIndicatorView 项目地址: https://github.com/81813780/AVLoadingIndicatorView 首先,在 bui ...

  2. android 基础控件(EditView、SeekBar等)的属性及使用方法

        android提供了大量的UI控件,本文将介绍TextView.ImageView.Button.EditView.ProgressBar.SeekBar.ScrollView.WebView ...

  3. Android基本控件之Menus

    在我们的手机中有很多样式的菜单,比如:我们的短信界面,每条短信,我们长按都会出现一个菜单,还有很多的种类.那么现在,我们就来详细的讨论一下安卓中的菜单 Android的控件中就有这么一个,叫做Menu ...

  4. Android:控件布局(相对布局)RelativeLayout

    RelativeLayout是相对布局控件:以控件之间相对位置或相对父容器位置进行排列. 相对布局常用属性: 子类控件相对子类控件:值是另外一个控件的id android:layout_above-- ...

  5. Android:控件布局(线性布局)LinearLayout

    LinearLayout是线性布局控件:要么横向排布,要么竖向排布 决定性属性:必须有的! android:orientation:vertical (垂直方向) .horizontal(水平方向) ...

  6. 矩阵, 矩阵 , Android基础控件之ImageView

    天下文章大家抄,以下所有内容,有来自copy,有来自查询,亦有自己的总结(目的是总结出自己的东西),所以说原创,不合适,说是转载也不恰当,所以我称之为笔记,可惜没有此分类选项,姑且不要脸一点,选择为原 ...

  7. Android给控件添加触摸回调

    Android给控件添加触摸回调 脑补一个场景,一个页面点击某个按钮会弹出PopupWindow,然后点击PopupWindow以外的任意位置关闭 效果图 实现方法 可以在布局的最外层容器监听触摸事件 ...

  8. Android 基本控件相关知识整理

    Android应用开发的一项重要内容就是界面开发.对于用户来说,不管APP包含的逻辑多么复杂,功能多么强大,如果没有提供友好的图形交互界面,将很难吸引最终用户.作为一个程序员如何才能开发出友好的图形界 ...

  9. Github上star数超1000的Android列表控件

    Android开发中,列表估计是最最常使用到的控件之一了.列表相关的交互如下拉刷新,上拉更多,滑动菜单,拖动排序,滑动菜单,sticky header分组,FAB等等都是十分常见的体验.Github中 ...

随机推荐

  1. BCB:AnsiString和String的区别

    AnsiString和String的区别.使用 本文转自:http://www.bianceng.cn/c/index.htm 16.C/C++语言在CB中的一些特定用法 2)AnsiString是从 ...

  2. vs编译obj给delphi用

    Cl /O2  /c  bjhash.cpp  记得cl x32 和cl x64的区别

  3. Java中的日期(Calendar、Date)

    (1)获取当前日期: java.util.Calendar calendar = java.util.Calendar.getInstance(); 或  = new java.util.Gregor ...

  4. C语言数组_04

    概念:数组是在程序设计中,为了处理方便, 把具有相同类型的若干变量按有序的形式组织起来的一种形式.这些按序排列的同类数据元素的集合称为数组.在C语言中,数组属于构造数据类型.一个数组可以分解为多个数组 ...

  5. 大数据学习系列之Hadoop、Spark学习线路(想入门大数据的童鞋,强烈推荐!)

    申明:本文出自:http://www.cnblogs.com/zlslch/p/5448857.html(该博客干货较多) 1 Java基础: 视频方面:          推荐<毕向东JAVA ...

  6. mac系统快捷键大全详细介绍(全部)

    对于使用苹果电脑的操作系统的新人来说,快捷键是个很麻烦的问题,要一个个的找到快捷键也不是很容易的问题,今天这篇文章就解决了到处找快捷键的麻烦. 第一种分类:启用快捷键 按下按键或组合键,直到所需的功能 ...

  7. 【NOIP2017提高A组冲刺11.6】拆网线

    和syq大兄弟吐槽题目不小心yy出了正解.. 最优的选法就是选两个两个相互独立的,欸这不就是最大匹配吗?那多的企鹅就新加一条边呗?不够的就除以2上取整呗? 欸?AC了? 树也是一个二分图,最大匹配=最 ...

  8. 常用c++函数

    strrev(str)  (str为字符串)倒序输出字符串 floor(x),有时候也写做Floor(x),其功能是“向下取整”,或者说“向下舍入”,即取不大于x的最大整数(与“四舍五入”不同,下取整 ...

  9. BIOM Table-codes

    import numpy from biom.table import Table ========================================================== ...

  10. 基础训练 Huffuman树

    Huffuman树 /*解法一*/ #include<iostream> #include<queue> using namespace std; int main(){ pr ...