Android基础积累
来源:互联网 发布:数据质量检测报告 编辑:程序博客网 时间:2024/06/14 00:51
1、新建控件的构造方法都需要一个context的参数,一般都是当前的activity。
2、在linearlayout布局中,android:orientation="vertical "设置线性布局的对齐方式, 默认为horizontal。
3、<TableLayout
android:id="@+id/TableLayout02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0">
<!-- android:stretchColumns="0" 设置0号列为可伸展的列,当有多个列可伸展时用逗号隔开 -->
4、<TableLayout
android:id="@+id/TableLayout03"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:collapseColumns="1"
android:shrinkColumns="0">
<!-- android:collapseColumns="1" 隐藏编号为1的列,若有多个列要隐藏,则用逗号隔开,如0,2 -->
<!-- android:shrinkColumns="0" 设置0号列为可收缩的列,可收缩的列会纵向扩展 若有多个列要收缩,则用逗号隔开,如0,2 -->
5、android:layout_x 和 android:layout_y 只有在 AbsoluteLayout 布局中才会出效的,用于描述该子元素的坐标位置。
6、android:singleLine="true"设置单行显示。如果和layout_width一起使用,当文本不能全部显示时,后面用“…”来表示。如android:text="test_ singleLine "android:singleLine="true"android:layout_width="20dp"将只显示“t…”。如果不设置singleLine或者设置为false,文本将自动换行。
7、android:ems = "10" 设置TextView或者Edittext的宽度为10个字符的宽度。当设置该属性后,控件显示的长度就为10个字符的长度,超出的部分将不显示。
8、 new Timer().schedule(new TimerTask(){
@Override
public void run() {
myHandler.sendEmptyMessage(0x1233);
}
},0,1200);//void java.util.Timer.schedule(TimerTask task, long delay, long period)设置一个定时器周期性的执行任务,schedule方法的三个参数分别代表者时间任务,延时和执行周期。
actionbar里每个item的优先级,值越大优先级越低,actionbar地方不够就会放到overflow中
- Android系统基础积累
- Android基础积累
- android积累
- android 积累
- Android 积累
- Android 积累
- Android系统基础面试笔试题积累,持续更新。。。。
- JAVA基础积累
- c++ java 基础积累
- Excle基础用法积累
- java基础知识点积累
- java 基础积累
- java 基础积累
- java积累基础
- sql基础积累
- AJAX解析 基础积累
- 几何视觉基础积累
- Java 0基础积累
- iOS Developer Library
- Qt 之QRegExp
- 22.PHP内核探索:PHP哈希算法设计
- [Hbase]eclipse下操作hbase
- PHP中$GLOBALS和global的区别
- Android基础积累
- 1034. Forest
- 修改system.img的文件的权限和属性:使用make.ext4fs的方法
- 解决PKIX问题:unable to find valid certification path to requested target
- android中开启线程
- iOS 简单调用全国天气API,解析JSON
- C++11 FAQ中文版:std::function 和 std::bind
- 什么是 Java序列化,深入理解Java对象序列化
- 第11周项目3-程序的多文件组织