main.xml代码下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical...
分类:
其他好文 时间:
2015-01-19 12:56:22
阅读次数:
109
在应用程序中经常用到启动画面,会启动一个后台线程为主程序的运行准备资源。
Android要实现启动画面可以这样做:
这是splash.xml布局文件的代码[code]
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layou...
分类:
移动开发 时间:
2015-01-19 12:54:50
阅读次数:
219
首先看一下效果图:
整个页面布局为:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:back...
分类:
移动开发 时间:
2015-01-15 18:14:37
阅读次数:
199
三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或...
分类:
移动开发 时间:
2015-01-10 17:58:21
阅读次数:
147
代码很简单,主要是一些常用传感器的监听,指南针还是挺好用的。
布局代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_...
分类:
移动开发 时间:
2015-01-06 17:58:56
阅读次数:
180
ScrollView里只能放一个元素. 当ScrollView里的元素想填满ScrollView时,使用"fill_parent"是不管用的,必需为ScrollView设置:android:fillViewport="true"。我猜 当ScrollView没有fillVeewport=“true”...
分类:
其他好文 时间:
2015-01-06 11:29:48
阅读次数:
111
组件继承关系图: 组件通用属性: ? ? 1)layout_width:组件的宽度,一般只有三个值wrap_content、fill_parent(老版本中使用)、match_parent,但他不是唯一控制宽度的元素 ? ? 2)layout_height:组件的高...
分类:
移动开发 时间:
2015-01-05 22:04:38
阅读次数:
359
在登录或者注册的时候,有些软件中,需求要求密码可以查看和隐藏,其实实现起来也很简单。
首先定义布局:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50.0dip"
android:layout_marginLeft="15dip"...
分类:
移动开发 时间:
2015-01-05 18:45:26
阅读次数:
211
项目实战:实现一个简单计算器界面设计(1)拖进一个大文本,整屏,设计各个数字及运算,用Table来存放。<TableLayoutandroid:layout_width="fill_parent"android:layout_height="wrap_content"><TableRowandroid:id="@+id/tableRow1"android:layout_width="fill_pare..
分类:
移动开发 时间:
2014-12-29 18:38:00
阅读次数:
280
android屏幕适配详解官方地址:http://developer.android.com/guide/practices/screens_support.html一、关于布局适配建议1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽...
分类:
移动开发 时间:
2014-12-23 12:03:06
阅读次数:
133