布局非常简单。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="...
分类:
其他好文 时间:
2015-03-30 16:35:16
阅读次数:
172
一、属性 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
2.SD卡读写操作1读写sd卡首先得添加读写权限2.建一个布局文件,用来接收和展示数据<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"
android:layout_height..
分类:
移动开发 时间:
2015-03-21 14:09:54
阅读次数:
175
一个Android开发中常用对话框的小例子,共有五种对话框:普通弹出对话框,单选对话框,多选对话框,输入对话框及进度条样式对话框:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_paren...
分类:
移动开发 时间:
2015-03-20 16:35:30
阅读次数:
171
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity"&g..
分类:
其他好文 时间:
2015-03-20 14:34:38
阅读次数:
174
自定义的一个ListView放到布局文件中,设置width=match_parent,height=wrap_content。设置数据后执行notifyDatasetChanged。可以确定数据发生了变化,但是没有进入到getView中刷新数据。经过尝试,设置height为match_parent之...
分类:
其他好文 时间:
2015-03-20 12:20:07
阅读次数:
118
先看欢迎界面的布局
activity_welcome.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
a...
分类:
其他好文 时间:
2015-03-14 23:14:50
阅读次数:
200
基于数组的ListViewlistview1.xml<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"android:layout_height="match_parent">
<ListView
android:layout_wi..
分类:
移动开发 时间:
2015-03-14 20:16:16
阅读次数:
153
基于ArrayAdapter创建ListView程序清单listview2.xml<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"android:layout_height="match_parent">
<ListView
..
分类:
移动开发 时间:
2015-03-14 20:15:58
阅读次数:
230