随笔分类 -  Tutorial

摘要:<<SQLiteDemo1.zip>> SQLite Demo1 演示 演示操作SQLite数据库 新建项目SQLiteDemo1,编辑res/layout/main.xml 布局文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" an 阅读全文
posted @ 2011-03-25 17:25 敏捷学院 阅读(545) 评论(1) 推荐(0)
摘要:<<PrefsDemo_Dialog.zip>> Dialog(使用对话框的Preferences) 新建项目 PrefsDemo_Dialog 编辑res/layout/main.xml文件 <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent&qu 阅读全文
posted @ 2011-03-25 17:24 敏捷学院 阅读(701) 评论(0) 推荐(0)
摘要:<<PrefsDemo_Structured.zip>> Structured(分组的Prefereces) 新建项目 ProfsDemo_Structured. 编辑res/layout/main.xml布局文件 <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fil 阅读全文
posted @ 2011-03-25 17:21 敏捷学院 阅读(263) 评论(0) 推荐(0)
摘要:<<PrefsDemo_Simple.zip>> 使用Xml布局文件描述 Preferences 新建项目 Prefs_Simple 编辑 res/layout/main.xml 配置文件 <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" 阅读全文
posted @ 2011-03-25 17:20 敏捷学院 阅读(559) 评论(0) 推荐(0)
摘要:Source codeSharePreferences Demo2 新建项目PreferDemo, 编辑res/layout/main.xml布局文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill 阅读全文
posted @ 2011-03-25 17:18 敏捷学院 阅读(201) 评论(0) 推荐(0)
摘要:<<SharedPreferencesDemo.zip>> SharedPreferences 存储方式 SharedPreferences 用来存储一些简单的配置信息。 新建项目SharedPreferencesDemo,编辑res/layout/main.xml文件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" a 阅读全文
posted @ 2011-03-25 17:17 敏捷学院 阅读(365) 评论(0) 推荐(0)
摘要:<<ToastNotificationDemo.zip>> Notificaton和Toast演示 新建项目 ToastNotificationDemo,修改res/layout/main.xml布局文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertica 阅读全文
posted @ 2011-03-25 17:10 敏捷学院 阅读(413) 评论(0) 推荐(0)
摘要:<<DialogDemo.zip>> Dialog 演示 新建项目DialogDemo. 编辑res/layout/main.xml 布局文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width=&q 阅读全文
posted @ 2011-03-25 17:07 敏捷学院 阅读(401) 评论(0) 推荐(0)
摘要:<<ListViewDemo.zip>> ListView演示 新建项目ListViewDemo,编辑res/layout/main.xml 布局文件如下: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_wi 阅读全文
posted @ 2011-03-25 17:05 敏捷学院 阅读(706) 评论(1) 推荐(1)
摘要:Download Source Code <<ActivityIntentDemo.zip>> Activity 和 Intent 演示 使用startActivity()方法在Activity之间切换 使用Intent.putExtra()、Intent.putExtras()方法保存需要传递的数据 使用startActivityForResult()方法在Activity之间传递参数 重载onActivityResult()方法处理回传数据 使用Intent.getExtra()、Intent.getExtras()方法获取传递的数据 新建项目ActivityInt 阅读全文
posted @ 2011-03-25 17:02 敏捷学院 阅读(420) 评论(0) 推荐(0)
摘要:Download Source Code Menu 演示 重载onCreateOptionsMenuMenu创建菜单 重写 onOptionsItemSelected()方法,处理菜单项的选中 新建项目MenuDemo,修改res/layout/main.xml布局文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orie 阅读全文
posted @ 2011-03-25 16:58 敏捷学院 阅读(343) 评论(0) 推荐(0)
摘要:WidgetDemo主界面 创建项目WidgetDemo 编辑main.xml <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" > <LinearLayo 阅读全文
posted @ 2011-03-25 16:49 敏捷学院 阅读(583) 评论(0) 推荐(0)
摘要:UI布局 如何使用FrameLayout布局 如何单独使用LinearLayout布局 如何单独使用RelativeLayout布局 结合LinearLayout和RelativeLayout布局 如何使用TableLayout布局 FrameLayout 创建项目 Layouts,用于布局的演示。 打开res/layout/main.xml 如下编辑 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.andro 阅读全文
posted @ 2011-03-25 16:39 敏捷学院 阅读(856) 评论(0) 推荐(0)
摘要:QuickStart 代码下载! 阅读全文
posted @ 2011-03-25 16:36 敏捷学院 阅读(185) 评论(0) 推荐(0)
摘要:Google Map View 本演练演示Google Maps library, 你可以创建自己的google地图。 注意本演练需要使用扩展了Google Maps library的 Android SDK 。 Part1 Create a map Activity 新建项目 HelloGoogleMaps。 Maps library 不是标准的Android library. 必须在 Android Manifest 中声明。打开AndroidManifest.xml 为<application>节增加下面的配置节。 <uses-library android:name= 阅读全文
posted @ 2011-03-25 16:30 敏捷学院 阅读(340) 评论(0) 推荐(0)
摘要:Gallery Gallery是一个水平滚动项的布局控件。 本演练将创建一个相册走廊,同时显示选中的图片信息。 新建项目HelloGallery。 将使用的图片放入res/drawable目录。 3. 打开res/layout/main.xml文件编辑如下。 <?xml version="1.0" encoding="utf-8"?> <FrameLayout android:id="@+id/FrameLayout01" android:layout_width="fill_parent" an 阅读全文
posted @ 2011-03-25 16:29 敏捷学院 阅读(294) 评论(0) 推荐(0)
摘要:Web View 本演练创建一个可以访问web页的应用程序,使用WebView控件。 新建项目 HelloWebView 2. 打开res/layout/main.xml替换成以下内容 <?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width=&quo 阅读全文
posted @ 2011-03-25 16:29 敏捷学院 阅读(203) 评论(0) 推荐(0)
摘要:Auto Complete 本演练创建一个自动完成控件,使用AutocompleteTextView控件。 新建项目 HelloAutoComplete。 在res/layout/目录下创建lsit_item.xml,按如下代码编辑。 <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_par 阅读全文
posted @ 2011-03-25 16:28 敏捷学院 阅读(219) 评论(0) 推荐(0)
摘要:Spinner Spinner是一个下拉选择想的列表。 本演练将创建一个简单的spinner 用于显示一个植物列表,然后显示选中的项。 新建项目HelloSpinner 2. 打开 res/layout/main.xml 使用下面的开发更改xml文件。 <Spinner android:id="@+id/spinner" android:layout_width="fill_parent" android:layout_height="wrap_content" android:prompt="@string/plan 阅读全文
posted @ 2011-03-25 16:26 敏捷学院 阅读(219) 评论(0) 推荐(0)
摘要:Form Stuff 本演练演示使用多样的控件创建表单,如Image button, text files, checkboxes and radio buttons. 新建项目 HelloFormStuff 打开res/layout/main.xml文件,修改代码如下: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orie 阅读全文
posted @ 2011-03-25 16:25 敏捷学院 阅读(274) 评论(0) 推荐(0)