android 札记三 hello world
来源:互联网 发布:sis实时数据库有哪些 编辑:程序博客网 时间:2024/06/07 15:24
一 新建一个android工程
二 AndroidManifest.xml文件
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sxt" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloWorldActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>三 values/strings.xml
<?xml version="1.0" encoding="utf-8"?><resources> <string name="hello">Hello World, HelloWorldActivity!</string> <string name="app_name">HelloWorld</string></resources>
四 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_parent" android:layout_height="fill_parent" ><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
五 gen/com.sxt.R.java/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */package com.sxt;public final class R { public static final class attr { } public static final class drawable { public static final int icon=0x7f020000; } public static final class layout { public static final int main=0x7f030000; } public static final class string { public static final int app_name=0x7f040001; public static final int hello=0x7f040000; }}
六 src/com.sxt.HelloWorldActivity.javapackage com.sxt;import android.app.Activity;import android.os.Bundle;public class HelloWorldActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }}
- android 札记三 hello world
- 10.2 Hello World! Hello Android!
- Android简明开发教程三:第一个应用Hello World
- Android简明开发教程三:第一个应用Hello World
- Android的Hello World
- android入门--hello world
- android之Hello World!
- android--hello world
- Android Hello World
- Android之Hello World
- android--Hello,World教程
- Android Hello World
- Android入门-Hello World
- Hello Android World!
- Android hello world
- android ndk hello,world!
- phonegap android hello world
- android hello world
- 基于字符设备的IIC驱动源代码
- Installing and Configuring GoldenGate Veridata Agent
- 怎样从柱参数值中获取对应的Level对象
- javascript加载解析xml文件
- Meego下一步将如何-来自meego官方主页
- android 札记三 hello world
- n级阶梯,每次走一步或两步,问最多有多少种走法
- gdb断点(七)为断点设定指令集Breakpoint Command Lists
- 关于泰泽-泰泽官网介绍
- 简单的servlet程序的编写2— 完成程序
- mysql备份还原(视图、存储过程)
- selector的使用
- 英特尔三星携手开发Tizen平台 望成OS第4势
- Android日志服务例子,将日志记录在文件中并每天生成一个日志文件