android widgets控件
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控件的更多相关文章
- Android 开源控件与常用开发框架开发工具类
Android的加载动画AVLoadingIndicatorView 项目地址: https://github.com/81813780/AVLoadingIndicatorView 首先,在 bui ...
- android 基础控件(EditView、SeekBar等)的属性及使用方法
android提供了大量的UI控件,本文将介绍TextView.ImageView.Button.EditView.ProgressBar.SeekBar.ScrollView.WebView ...
- Android基本控件之Menus
在我们的手机中有很多样式的菜单,比如:我们的短信界面,每条短信,我们长按都会出现一个菜单,还有很多的种类.那么现在,我们就来详细的讨论一下安卓中的菜单 Android的控件中就有这么一个,叫做Menu ...
- Android:控件布局(相对布局)RelativeLayout
RelativeLayout是相对布局控件:以控件之间相对位置或相对父容器位置进行排列. 相对布局常用属性: 子类控件相对子类控件:值是另外一个控件的id android:layout_above-- ...
- Android:控件布局(线性布局)LinearLayout
LinearLayout是线性布局控件:要么横向排布,要么竖向排布 决定性属性:必须有的! android:orientation:vertical (垂直方向) .horizontal(水平方向) ...
- 矩阵, 矩阵 , Android基础控件之ImageView
天下文章大家抄,以下所有内容,有来自copy,有来自查询,亦有自己的总结(目的是总结出自己的东西),所以说原创,不合适,说是转载也不恰当,所以我称之为笔记,可惜没有此分类选项,姑且不要脸一点,选择为原 ...
- Android给控件添加触摸回调
Android给控件添加触摸回调 脑补一个场景,一个页面点击某个按钮会弹出PopupWindow,然后点击PopupWindow以外的任意位置关闭 效果图 实现方法 可以在布局的最外层容器监听触摸事件 ...
- Android 基本控件相关知识整理
Android应用开发的一项重要内容就是界面开发.对于用户来说,不管APP包含的逻辑多么复杂,功能多么强大,如果没有提供友好的图形交互界面,将很难吸引最终用户.作为一个程序员如何才能开发出友好的图形界 ...
- Github上star数超1000的Android列表控件
Android开发中,列表估计是最最常使用到的控件之一了.列表相关的交互如下拉刷新,上拉更多,滑动菜单,拖动排序,滑动菜单,sticky header分组,FAB等等都是十分常见的体验.Github中 ...
随机推荐
- 解决Genymotion2.8.1在拖动安装APK文件出现ARMtranslate错误
转载文章:http://blog.csdn.net/solo_talk/article/details/68488129 在新版本的genymotion中,我们拖动安装APK文件的时候会出现一个问题, ...
- linux设置http/https proxy及忽略proxy的方法
msys2设置网络代理 在文件 .bashrc 中添加 export http_proxy="proxy IP:port" 如 export http_proxy="19 ...
- java第九次作业:第九章例题3个
作业1: 例题9.1 制作圆类,根据圆的半径求出周长及面积 package com.swift; //抽象的方法构成类,把属性和方法进行封装 public class Circle { // 两个方面 ...
- [LUOGU] P1111 修复公路
题目背景 A地区在地震过后,连接所有村庄的公路都造成了损坏而无法通车.政府派人修复这些公路. 题目描述 给出A地区的村庄数N,和公路数M,公路是双向的.并告诉你每条公路的连着哪两个村庄,并告诉你什么时 ...
- python 中变量和对象
1. 在 python 中,类型属于对象,变量是没有类型的:a=[1,2,3] a="Runoob"以上代码中,[1,2,3] 是 List 类型,"Runoob&quo ...
- 用java Graphics生成验证码
以下下是API文档对Graphics的介绍! Graphics 类是所有图形上下文的抽象基类,允许应用程序在组件(已经在各种设备上实现)以及闭屏图像上进行绘制. Graphics 对象封装了 Java ...
- Verilog学习笔记基本语法篇(三)·········赋值语句(待补充)
在Verilog HDL语言中,信号有两种赋值方式. A)非阻塞赋值(Non-Blocking)方式(如:b<=a;) (1)在语句块中,上面语句所赋值的变量不能立即为下面的语句所用: (2)块 ...
- 记如何解决蓝桥杯中to_string和atoi等无法使用的问题
#include<iostream> #include<sstream> using namespace std; int main() { // int 转 string ...
- STM32F407 I2C 个人笔记
源代码;https://github.com/YuQiao0303/STM32F407-Examples/tree/master/24.IIC 概述 I2C (IIC, Inter-Integrate ...
- js中取绝对值的2种方法!
1.abs() var aaa=-20; var bbb=Math.abs(aaa); 2.加减法 var aaa=-20; var bbb=-aaa