安卓工程结构Basic Android project structure
来源:互联网 发布:软件可靠性工程手册 编辑:程序博客网 时间:2024/05/18 00:24
After you have installed all the plug-ins necessary for the development of an Android file, you can now begin to develop an Android application. From the top menu, choose File -> Project, and from the "New Project window", choose "Android Project". Follow the project setup wizard and after finishing the wizard, you will have a basic Android application.Every Android project contains several folders:
- src: This folder contains the Java source files.
- gen: Generated Java library, this library is for Android internal use only.
- Res: Here we can store resource files such as pictures, XML files for defining layouts, and so forth. Within this folder there are additional folders such asDrawable,Layout, andValues.
- Drawable: Here we store the various graphic files. We can see three types of drawable folders. This is because there are many Android devices with different screen resolutions. By default, there are several versions of this folder such as:Drawable-mdpi,drawable-hdpi, and so forth. This is required in order to adapt to different screen resolutions.
- Layout: This is the place for XML layout files. Layout files are XML files which define how various Android objects (such as textboxes, buttons, etc.) are organized on the screen.
- Values: XML files which store various string values (titles, labels, etc.).
Major files in the Android project:
- AndroidManifest.xml: This is the Android definition file. It contains information about the Android application such as minimum Android version, permission to access Android device capabilities such as internet access permission, ability to use phone permission, etc.
- MainLayout.xml: This file describes the layout of the page. This means the placement of every component (such as textboxes, labels, radio buttons, user defined components, etc.) on the app screen.
Activity
class: Every application that occupies the entire device screen needs at least one class which inherits from theActivity
class. One major method is calledOnCreate
. This method initiates the app and loads the layout page.
gen下面的R.java是在建立项目时自动生成的,这个文件是只读模式,不能更改,R.java文件是定义该项目所有资源的索引文件。
- 安卓工程结构Basic Android project structure
- Android的工程结构(The structure of Android Project)
- Basic Structure 基本结构:
- Basic Structure 基本结构:
- Android project structure
- 安卓工程的目录结构
- 安卓的工程目录结构
- Android studio 中 Project Structure 的使用
- 安卓sdk的目录结构,安卓project的目录结构
- Unity XCode项目结构 Structure of an Unity XCode Project
- Android project的结构
- 安卓&android工程逆向记录
- 安卓Project目录
- Basic Data Structure summary
- 1.Basic Structure
- Basic Data Structure
- Basic Data Structure
- Basic Data Structure
- 一种面向IEEE 802.11e EDCA的MPEG-4视频传输的自适应跨层映射算法
- 详谈 JQuery Ajax异步处理Json数据
- 常用网站
- jQuery EasyUI DataGrid 分页 FOR ASP.NET
- JQuery 变量 选择器
- 安卓工程结构Basic Android project structure
- JQuery EasyUI window 用法
- Android休眠唤醒机制简介(一)
- 3步提高网站质量
- JQuery EasyUI 最简单的左右布局实现及tab的右键菜单实现
- JQuery EasyUI datagrid 批量编辑和提交
- JQuery EasyUI datagrid 键盘上下控制选中行
- JQuery EasyUI 根据数据动态生成datagrid,统计常用
- SQL Server 分页语句