滚动视图 <ScrollView android: layout_width="fill_parent" android: layout_height="fill_parent"> </ScrollView> 滚动试图指的是提供一个专门的容器,可以装下多于屏幕宽度的组件,而后采用拖拽的方式 显示所有 ...
分类:
移动开发 时间:
2017-06-07 18:52:52
阅读次数:
270
(一)控件的方式 1.用XML代码定义 <TextView android:layout_width="fill_parent" android:layout_height="wrap_content android:text="Hello World" android:textSize="40sp ...
分类:
其他好文 时间:
2017-06-07 12:32:15
阅读次数:
206
计时器(秒表)Chronometer <Chronometer android:id="@+id/miaobiao" android:layout_width="wrap_content" android:layout_height="wrap_content"/> 1 mychrCh.setOnC ...
分类:
其他好文 时间:
2017-06-05 15:47:42
阅读次数:
293
1.头部布局文件top.xml:<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width=" ...
分类:
微信 时间:
2017-06-04 18:22:29
阅读次数:
364
定义的getView运行多次的ListView布局: <ListView android:id="@+id/lv_messages" android:layout_width="match_parent" android:layout_height="match_parent" android:la ...
分类:
移动开发 时间:
2017-06-03 12:36:35
阅读次数:
212
1.创建程序activity_main: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_hei ...
分类:
移动开发 时间:
2017-05-29 15:57:10
阅读次数:
243
一、基础View控件 View类的常见XML属性,对应发放及说明 每个界面控件都需要设置Android:layout_height,Android:layout_width,指定控件的高度和宽度。通常有三种取值 android:layout_width="wrap_content"表示控件的宽(用h ...
分类:
移动开发 时间:
2017-05-28 18:05:04
阅读次数:
185
(一)控件的方式 1.用XML代码定义 <TextView android:layout_width="fill_parent" android:layout_height="wrap_content android:text="Hello World" android:textSize="40sp ...
分类:
其他好文 时间:
2017-05-27 00:43:48
阅读次数:
180
1.线性布局 通过layout_gravity 选择对齐方式 如下图所示 layout_width 来设置占屏幕的比例 系统将LinearLayout下的所有控件相加得到总值然后每个控件的layout_width的值就是比例。 如下图所示 若将Button的layout_width设置为 wrap_ ...
分类:
移动开发 时间:
2017-05-24 23:57:15
阅读次数:
280
1.LinearLayout(线性布局) android: orientation="vertical" //布局 android: layout_width="wrap_content " //控件宽度 android: layout_height="fill_parent" //控件高度 注意: ...
分类:
其他好文 时间:
2017-05-19 22:25:13
阅读次数:
163