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中 ...
随机推荐
- C++ lvalue,prvalue,xvalue,glvalue和rvalue详解(from cppreference)
General 每一个C++表达式(一个操作符和它的操作数,一个字面值,一个变量名等等)都代表着两个独立属性:类型+属性分类.在现代C++中 glvalue(泛左值) = lvalue (传统意义上的 ...
- Bootstrap 网格系统(Grid System)实例5
Bootstrap 网格系统(Grid System)实例5:手机,平板电脑,笔记本或台式电脑 <!DOCTYPE html><html><head><met ...
- 使用Xcode连接开源中国
故事背景: 今天加入一个新的项目组,其实也就是包括我在内就两个人,由于对方在开源中国上建的项目我没法使用. 所以由我接手第一个任务:就是在开源中国上搭建git项目组 前提条件:xcode和 Git(h ...
- Ruby设计模式-观察者模式学习笔记
observer.rb #!/bin/env ruby # encoding: utf-8 require 'observer' class CriminalMovement include Obse ...
- 求NEXT数组和KMP匹配的两种写法
注释掉的是我不喜欢的写法. //计算串str的next数组 void getnext(char *str){ int len=strlen(str); ,k=-; next[]=-; while(j& ...
- PHP发送邮件标题乱码的解决
遇到问题:PHPMailer发送邮件时中文乱码,本来我的系统都是英文内容的,后来需求变化需要在标题中添加中文,但是在使用安卓自带邮件工具收取是出现乱码,而使用QQ邮箱查看确实正常的. 解决方法: 先用 ...
- Python语言程序设计之三--列表List常见操作和错误总结
最近在学习列表,在这里卡住了很久,主要是课后习题太多,而且难度也不小.像我看的这本<Python语言程序设计>--梁勇著,列表和多维列表两章课后习题就有93道之多.我的天!但是题目出的非常 ...
- 用java Graphics生成验证码
以下下是API文档对Graphics的介绍! Graphics 类是所有图形上下文的抽象基类,允许应用程序在组件(已经在各种设备上实现)以及闭屏图像上进行绘制. Graphics 对象封装了 Java ...
- Repo command reference
Repo command reference In this document init sync upload diff download forall prune start status Rep ...
- Developing
To work with the Android code, you will need to use both Git and Repo. In most situations, you can u ...