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
转自:http://blog.sina.com.cn/s/blog_72fad6270100tq0n.html设置单行显示。如果和layout_width一起使用,当文本不能全部显示时,后面用“…”来表示。如android:text="test_ singleLine "android:single...
分类:
移动开发 时间:
2015-03-21 12:30:23
阅读次数:
510
一个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
这几天一直在忙着开发一个新项目,写代码写得昏天黑地的,今天抽了几分钟时间写了下极简单的例子,改天有时间再写啦!
布局文件很简单,就一个Button:
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_...
分类:
其他好文 时间:
2015-03-20 14:33:27
阅读次数:
115
先看欢迎界面的布局
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
1、在一个Relatitivelayout布局里用代码add一个独立的button布局,结果该button的宽高无效则说明:Android中控件默认是没有宽高的,只有五大布局才能给其宽高,即在代码中要设置控件的宽高需要使用福控件的layoutparams命名规则:layout_width想通的:la...
分类:
移动开发 时间:
2015-03-14 22:56:44
阅读次数:
177
基于数组的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
使用SimpleAdapter创建ListView程序清单1<?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:lay..
分类:
移动开发 时间:
2015-03-14 20:11:14
阅读次数:
269