Adroid项目目录结构
来源:互联网 发布:sql注入登录 编辑:程序博客网 时间:2024/04/30 18:23
- package com.yarin.Android.HelloAndroid;
-
- public final class R {
-
public static final classattr { -
} -
public static final classdrawable { -
public static final int icon=0x7f020000; -
} -
public static final classlayout { -
public static final int main=0x7f030000; -
} -
public static final classstring { -
public static final int app_name=0x7f040001; -
public static final int hello=0x7f040000; -
} - }
- <?xml version="1.0"encoding="utf-8"?>
- <manifestxmlns:android="http://schemas.android.com/apk/res/android"
-
package="com.yarin.Android.HelloAndroid" -
android:versionCode="1" -
android:versionName="1.0"> -
<applicationandroid:icon="@drawable/icon" - android:label="@string/app_name">
-
<activityandroid:name=".HelloAndroid" -
android:label="@string/app_name"> -
<intent-filter> -
<actionandroid:name="android.intent.action.MAIN"/> -
<categoryandroid:name="android.intent.category.LAUNCHER"/> -
</intent-filter> -
</activity> -
</application> -
<uses-sdkandroid:minSdkVersion="5" /> - </manifest>
manifest
根节点,描述了package中所有的内容
xmlns:android
包含命名空间的声明。
xmlns:android=http://schemas.
android.com/apk/res/android,使得
Android中各种标准属性能在文件中使用,
提供了大部分元素中的数据
Package
声明应用程序包
application
包含package中application级别组件声
明的根节点。此元素也可包含application
的一些全局和默认的属性,如标签、icon、
主题、必要的权限,等等。一个manifest
能包含零个或一个此元素(不能大余一个)
android:icon
应用程序图标
android:label
应用程序名字
Activity
用来与用户交互的主要工具。Activity是用
户打开一个应用程序的初始页面,大部分
被使用到的其他页面也由不同的activity所
实现,并声明在另外的activity标记中。
注意,每一个activity必须有一个<activity>
标记对应,无论它给外部使用或是只用于
自己的package中。如果一个activity没有
对应的标记,你将不能运行它。另外,
为了支持运行时查找Activity,可包含一个
或多个<intent-filter>元素来描述activity所支持的操作
android:name
应用程序默认启动的activity
intent-filter
声明了指定的一组组件支持的Intent值,从
而形成了IntentFilter。除了能在此元素下指
定不同类型的值,属性也能放在这里来描
述一个操作所需的唯一的标签、icon和其他信息
action
组件支持的Intentaction
category
组件支持的IntentCategory。这里指定
了应用程序默认启动的activity
uses-sdk
该应用程序所使用的sdk版本相关
- <?xml version="1.0"encoding="utf-8"?>
- <resources>
-
<stringname="hello">Hello World,HelloAndroid!</string> -
<stringname="app_name">HelloAndroid</string> - </resources>
- public static final class string {
-
public static final intapp_name=0x7f040001; -
public static final inthello=0x7f040000; - }
- Resources r = this.getContext().getResources();
- String appname= ((String) r.getString(R.string.app_name));
- String hello= ((String)r.getString(R.string.hello));
- <?xml version="1.0"encoding="utf-8"?>
- <resources>
-
<colorname="status_idle">#cccccc</color> -
<colorname="status_done">#637a47</color> -
<colorname="status_sync">#cc9900</color> -
<colorname="status_error">#ac4444</color> - </resources>
- <?xml version="1.0"encoding="utf-8"?>
- <LinearLayoutxmlns: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>
- package com.yarin.Android.HelloAndroid;
-
- import android.app.Activity;
- import android.os.Bundle;
-
- public class HelloAndroid extends Activity
- {
-
-
public voidonCreate(Bundle savedInstanceState) -
{ -
super.onCreate(savedInstanceState); -
-
setContentView(R.layout.main); -
} - }
- Adroid项目目录结构
- Android第一课--Adroid项目组织结构
- JavaWeb项目结构 目录结构
- Android项目目录结构
- android项目目录结构
- 项目目录结构
- Android-项目结构目录
- Android项目目录结构
- WEB项目目录结构
- Android项目目录结构
- Android项目目录结构
- Android项目目录结构
- Android项目目录结构
- Android项目目录结构
- JavaWeb项目目录结构
- iOS 项目目录结构
- iOS项目目录结构
- Android 项目目录结构
- MongoDB基本管理命令 2
- MongoDB GUI客户端工具大全
- 原汁原味:外国人常挂在嘴边的英语…
- 第一次安卓环境搭建
- android有关bluetooth常用api简介
- Adroid项目目录结构
- 2013年01月22日
- android传感器的学习
- final的作用
- 部分智能推荐算法总结
- 日历分析(三) java集合类
- android之创建button
- Intent 和 Intent Filter
- FileDescriptor对象和ParcelFileDe…