文本框:存放文本的<TextViewandroid:id="@+id/textView1"//控件的身份android:layout_width="wrap_content"android:layout_height="wrap_content"//wrap_content适应内容//match_parent填充容器//fill_parent跟match_parent一样的//直接使用整数单位dpandroid:layout_align..
分类:
移动开发 时间:
2015-05-24 06:40:31
阅读次数:
261
xml配置:android:id="@+id/sc_freement"android:layout_width="fill_parent"android:layout_height="fill_parent"android:layout_below="@id/category_line"androi...
分类:
移动开发 时间:
2015-05-23 01:11:17
阅读次数:
412
需要借助LocationManager类实现,下面直接看代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
androi...
分类:
移动开发 时间:
2015-05-20 11:29:47
阅读次数:
247
一、关于布局适配1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽量使用权重(android:layout_weight)4、如果是纯色背景,尽量使用android的shape 自定义。5、如果需要在特定分辨率下适配,可以在res目录上...
分类:
移动开发 时间:
2015-05-19 18:53:58
阅读次数:
223
一般android在启动的时候都会有一个splash页面,页面可以做一些动画,本次的welcome页面使用了一个imageview,宽度和高度设置fill_parent,然后设置图片全屏显示android:scaleType="fitXY" 这样不管图片多大都会全屏显示 然后在activity...
分类:
其他好文 时间:
2015-05-18 22:32:57
阅读次数:
183
废话不多说,直接上代码,布局文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation=...
分类:
移动开发 时间:
2015-05-18 10:56:22
阅读次数:
149
ListView 是手机系统中使用非常广泛的一种组件,它以垂直列表的形式显示所有列表项。
创建ListView的两种方式;
直接创建
让Activity继承ListActivity。
1.基于数组的ListView:
在布局文件中这么写:
<ListView
android:layout_width="fill_parent"
android:...
分类:
移动开发 时间:
2015-05-13 23:20:16
阅读次数:
352
<Button
????????????????android:id="@+id/btn_showcamera_usephoto"
????????????????android:layout_width="fill_parent"
????????????????android:layou...
分类:
移动开发 时间:
2015-05-12 16:01:12
阅读次数:
181
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。
1)fill_parent
设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。
2) wrap_content
设置一个视图的尺寸为wrap_content将强制性地使视图扩展以显示全部内容。以TextView和Im...
分类:
其他好文 时间:
2015-05-12 00:12:51
阅读次数:
120
1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或控件为fill_parent将强制性让它布满整个屏幕。2) wrap_content设置一个视图的尺寸为...
分类:
移动开发 时间:
2015-05-06 14:30:46
阅读次数:
123