1.TextView

类似,C#里的lable,显示一段文本

  1. <TextView
  2. android:id="@+id/textView2"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1"
  6. android:text="TextView" />

2.Button

  1. <Button
  2. android:text="PDA"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:id="@+id/buttonPDA"
  6. android:layout_weight="1"
  7. />

3.ToggleButton

点击按钮 OFF ON切换

  1. <ToggleButton
  2. android:id="@+id/toggleButton"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1"
  6. android:text="ToggleButton" />

4.CheckBox

复选框

  1. <CheckBox
  2. android:id="@+id/checkBox2"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1"
  6. android:text="CheckBox" />

5.RadioButton

单选框

  1. <RadioButton
  2. android:id="@+id/radioButton2"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1"
  6. android:text="RadioButton" />

6.CheckedTextView

  1. <CheckedTextView
  2. android:id="@+id/checkedTextView3"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1"
  6. android:text="多选风格"
  7. android:checkMark="?android:attr/listChoiceIndicatorMultiple"
  8. />
  9. <CheckedTextView
  10. android:id="@+id/checkedTextView4"
  11. android:layout_width="wrap_content"
  12. android:layout_height="wrap_content"
  13. android:layout_weight="1"
  14. android:text="单选风格"
  15. android:checkMark="?android:attr/listChoiceIndicatorSingle"
  16. />

7.Spinner

下拉框

  1. <Spinner
  2. android:id="@+id/spinner"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1" />

8.ProgressBar

弧形进度条1

  1. <ProgressBar
  2. android:id="@+id/progressBar"
  3. style="?android:attr/progressBarStyle"
  4. android:layout_width="wrap_content"
  5. android:layout_height="wrap_content"
  6. android:layout_weight="1" />

线型进度条2

  1. <ProgressBar
  2. android:id="@+id/progressBar3"
  3. style="?android:attr/progressBarStyleHorizontal"
  4. android:layout_width="wrap_content"
  5. android:layout_height="wrap_content"
  6. android:layout_weight="1" />

9.SeekBar

滑动调节1

  1. <SeekBar
  2. android:id="@+id/seekBar"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1" />

滑动调节2

  1.  
  1. <SeekBar
  2. android:id="@+id/seekBar2"
  3. style="@style/Widget.AppCompat.SeekBar.Discrete"
  4. android:layout_width="wrap_content"
  5. android:layout_height="wrap_content"
  6. android:layout_weight="1"
  7. android:max="10"
  8. android:progress="3" />
  1.  

10.QuickContactBadge

联系人

11.RatingBar

打分

  1. <RatingBar
  2. android:id="@+id/ratingBar"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1" />

12.Switch

滑动开关

  1. <Switch
  2. android:id="@+id/switch1"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:layout_weight="1"
  6. 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. C++ lvalue,prvalue,xvalue,glvalue和rvalue详解(from cppreference)

    General 每一个C++表达式(一个操作符和它的操作数,一个字面值,一个变量名等等)都代表着两个独立属性:类型+属性分类.在现代C++中 glvalue(泛左值) = lvalue (传统意义上的 ...

  2. Bootstrap 网格系统(Grid System)实例5

    Bootstrap 网格系统(Grid System)实例5:手机,平板电脑,笔记本或台式电脑 <!DOCTYPE html><html><head><met ...

  3. 使用Xcode连接开源中国

    故事背景: 今天加入一个新的项目组,其实也就是包括我在内就两个人,由于对方在开源中国上建的项目我没法使用. 所以由我接手第一个任务:就是在开源中国上搭建git项目组 前提条件:xcode和 Git(h ...

  4. Ruby设计模式-观察者模式学习笔记

    observer.rb #!/bin/env ruby # encoding: utf-8 require 'observer' class CriminalMovement include Obse ...

  5. 求NEXT数组和KMP匹配的两种写法

    注释掉的是我不喜欢的写法. //计算串str的next数组 void getnext(char *str){ int len=strlen(str); ,k=-; next[]=-; while(j& ...

  6. PHP发送邮件标题乱码的解决

    遇到问题:PHPMailer发送邮件时中文乱码,本来我的系统都是英文内容的,后来需求变化需要在标题中添加中文,但是在使用安卓自带邮件工具收取是出现乱码,而使用QQ邮箱查看确实正常的. 解决方法: 先用 ...

  7. Python语言程序设计之三--列表List常见操作和错误总结

    最近在学习列表,在这里卡住了很久,主要是课后习题太多,而且难度也不小.像我看的这本<Python语言程序设计>--梁勇著,列表和多维列表两章课后习题就有93道之多.我的天!但是题目出的非常 ...

  8. 用java Graphics生成验证码

    以下下是API文档对Graphics的介绍! Graphics 类是所有图形上下文的抽象基类,允许应用程序在组件(已经在各种设备上实现)以及闭屏图像上进行绘制. Graphics 对象封装了 Java ...

  9. Repo command reference

    Repo command reference In this document init sync upload diff download forall prune start status Rep ...

  10. Developing

    To work with the Android code, you will need to use both Git and Repo. In most situations, you can u ...