android:layout_weight详细分析介绍:布局文件是:出现的布局是:button1占了2/3,button2占了1/3。但是如果将布局文件中的button的属性android:layout_width="fill_parent"改为android:layout_width="wrap_...
分类:
移动开发 时间:
2015-04-15 16:20:19
阅读次数:
174
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent 设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。如:设置一个顶部布局或控件为fill_parent后将强制性让它布满整....
分类:
移动开发 时间:
2015-04-12 01:14:42
阅读次数:
128
android屏幕适配详解官方地址:http://developer.android.com/guide/practices/screens_support.html一、关于布局适配建议1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽...
分类:
移动开发 时间:
2015-04-11 23:51:23
阅读次数:
179
WebView是Android用来加载网页的组件,如果要使用此组件加载网上页面,则需要添加网络权限:
WebView和其他组件一样可以在xml中布局:
<WebView
android:id="@+id/webView"
android:layout_width="fill_parent"
a...
分类:
移动开发 时间:
2015-04-08 15:05:26
阅读次数:
132
一、布局文件main.xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_paren...
分类:
移动开发 时间:
2015-04-01 21:57:46
阅读次数:
199
(1)布局文件如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"...
分类:
移动开发 时间:
2015-04-01 21:56:38
阅读次数:
260
一、属性 1.android:layout_width:? ?1.fill_parent : match_parent 和 fill_parent的意义相同 ?2.match_parent : 表示让当前控件的大小和父布局的大小一样,也就是由父布局来决定当前控件的大小。 ?...
分类:
其他好文 时间:
2015-03-29 10:59:43
阅读次数:
140
android中的按钮控件,直接继承了TextView.,在页面上的显示是一个矩形的图形。控件的基本属性:android:id=””:按钮的唯一标识。android:layout_width=""和android:layout_height="":除了数值之外还有wrap_content(自适应),fill_parent(填充父控件)和match_parent(填..
分类:
移动开发 时间:
2015-03-28 18:59:26
阅读次数:
145
在应用程序中经常用到启动画面,会启动一个后台线程为主程序的运行准备资源。Android要实现启动画面可以这样做:这是splash.xml布局文件的代码[code]<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_height="fill_parent"android:l..
分类:
移动开发 时间:
2015-03-17 12:40:58
阅读次数:
204
一、机制
ListView机制 - 先执行getCount,然后执行getView。如果getCount返回0,不执行getView
Gallery convertView不会复用,每次都返回NULL
二、问题整理
ListView最下面一个item没有横线(Divider)?
listview的布局高使用wrap_content,应该使用fill_parent...
分类:
移动开发 时间:
2015-03-13 09:21:39
阅读次数:
1343