android中常见空间的使用方法1.TextViewTextView主要用于在界面上显示一段文本信息,如下面代码所示: 其中,在TextView标签中:android:id 给当前控件定义了一个唯一标识符;android:layout_width 指定了控件的宽度,其中match_paren...
分类:
移动开发 时间:
2015-05-22 00:23:01
阅读次数:
218
学习android的过程中,尝试新功能,结果出现了这个一个error:05-21 15:38:52.745: E/AndroidRuntime(17608): java.lang.RuntimeException: Unable to start activity ComponentInfo{com...
分类:
其他好文 时间:
2015-05-21 17:02:06
阅读次数:
395
Android的布局风格 布局应该从外往里写
1.LinearLayout(线性布局)
xml version="1.0" encoding="utf-8"?>
LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"...
分类:
移动开发 时间:
2015-05-20 16:30:25
阅读次数:
218
需要借助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
<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="match_parent"...
分类:
移动开发 时间:
2015-05-19 16:36:20
阅读次数:
167
有的时候我们需要为一个listview设置固定的数据,下边就是如何设置静态的数据布局文件listview 的主页面
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_...
分类:
移动开发 时间:
2015-05-18 18:57:43
阅读次数:
176
布局文件activity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:la...
分类:
移动开发 时间:
2015-05-18 18:56:57
阅读次数:
159
废话不多说,直接上代码,布局文件:
<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
接着上一节讨论的问题,本DEMO中会用到TTS语音合成,我们下面介绍一个同样原理的小例子
看一下布局文件很简单:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill...
分类:
移动开发 时间:
2015-05-18 09:09:11
阅读次数:
212
相对于多点触摸,单点触摸还是很简单的。
新建一个工程,先看看布局文件:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"...
分类:
移动开发 时间:
2015-05-15 21:28:52
阅读次数:
157