2012/09/26

android app的程式檔案特性與敘述


AndroidManifest.xml
The manifest file describes the fundamental characteristics of the app and defines each of its components. You'll learn about various declarations in this file as you read more training classes.
manifest file敘述了app的基本特性並定義每一個元件。
src/
Directory for your app's main source files. By default, it includes an Activity class that runs when your app is launched using the app icon.
該資料夾有app的主要來源檔案。預設下,包含了當app透過icon被執行所需要的 Activity 宣告。
res/
Contains several sub-directories for app resources. Here are just a few:
包含了一些app resources的子資料夾. 如下
drawable-hdpi/
Directory for drawable objects (such as bitmaps) that are designed for high-density (hdpi) screens. Other drawable directories contain assets designed for other screen densities.
layout/
Directory for files that define your app's user interface.
定義app的使用者介面。
values/
Directory for other various XML files that contain a collection of resources, such as string and color definitions.
該資料夾針對不同的XML檔案( 包含了資源的聚集,比如string, 顏色的定義),
When you build and run the default Android app, the default Activity class starts and loads a layout file that says "Hello World." The result is nothing exciting, but it's important that you understand how to run your app before you start developing.
當建立和執行預設的 Android app,預設的Activity class 會開始讀取一個 layout 檔( 輸出 Hello World.)。
結果或許沒那麼令人興奮,但這對於了解程式開發是很重要的。


資料來源
http://developer.android.com/training/basics/firstapp/running-app.html

VoiceHero 九折優惠碼

  用我的優惠碼 v_t9msjy 購買 Hero 或 Vclass 課程,都能享有 9 折優惠 ! 馬上報名:https://bit.ly/34w3dif