文档详情

android新手入门内部培训教程.doc

发布:2018-06-05约7.23千字共17页下载文档
文本预览下载声明
一、目录 一、目录开发搭建环境 1 开发搭建环境 1 1、java sdk 1 2、Eclipse 2 3、android SDK插件;SVN版本控制插件 2 二、文件结构 3 1.新建工程 3 2. 输入新建工程内容 3 3.工程目录结构 4 三、XML布局和国际化 5 1. 常用的布局 5 1.绝对布局AbsoluteLayout 5 2.线性布局 6 3. 表格布局TableLayout 6 2.最常用的LinearLayout介绍 8 3.国际化 9 四、按钮事件和Intent传值 10 1、概要 10 1、用例图 10 2、时序图 11 2、效果 11 1.程序进入后的界面: 11 2.点击按钮后 12 3.输入文字,并点击图片按钮后 12 4.设置中文后 12 3、代码 13 1.Main.java 13 2. GetIntent.java 14 3.配置文件 15 五、Activity生命周期 15 六、其他内容 16 开发搭建环境 1、java sdk jdk1.6 2、Eclipse Eclipse下载地址 3、android SDK插件;SVN版本控制插件 1、启动Eclipse 点击标题栏上的Help,选择Install New Software选项, 如图: 2、点击ADD按钮,并输入要安装的插件地址 SDK: SVN: 二、文件结构 1.新建工程 点击File ,New选项 ,点击Android Project;或者 点击File ,New选项 ,点击Other,如下图: 2. 输入新建工程内容: 3.工程目录结构 三、XML布局和国际化 1. 常用的布局 1.绝对布局AbsoluteLayout ?xml version=1.0 encoding=utf-8? AbsoluteLayout android:id=@+id/widget0 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=/apk/res/android Button android:id=@+id/widget28 android:layout_width=wrap_content android:layout_height=wrap_content android:text=Button android:layout_x=171px android:layout_y=154px /Button /AbsoluteLayout 效果: 2.线性布局 下面会详细介绍到 3. 表格布局TableLayout ?xml version=1.0 encoding=utf-8? TableLayout android:id=@+id/widget31 android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical xmlns:android=/apk/res/android TableRow android:id=@+id/widget32 android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal Button android:id=@+id/widget37 android:layout_width=wrap_content android:layout_height=wrap_content android:text=Button /Button Button android:id=@+id/widget38 android:layout_width=wrap_content android:layout_height=wrap_content android:text=Button /Button /TableRow TableRow android:id=@+id/widget33 android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal Button android:id=@+id/widget40 android:layout_width=wrap_content android:layout_height=wrap_content android:te
显示全部
相似文档