[ 基本使用狀況 ]
- 畫面更新只能在主執行緒中,因此如果在其它執行緒中有需要更新畫面,那就需要回到主執行緒。
- 從其它執行緒回到主執行緒,需使用 Handler。
- 主執行緒(UI執行緒)不允許執行需要長時間的動作,否則會產生 ANR(Application is Not Responding),因此就要使用其它執行緒,但結果需要更新畫面,因此就要用 Handler。
[ 使用方法 ]
[ 基本使用狀況 ]
[ 使用方法 ]
[ NetworkOnMainThreadException ]
Module :
官方說明 : A module is a collection of source files and build settings that allow you to divide your project into discrete units of functionality.
[ Intent / 意圖 ]
[ Reference ]
[ android:gravity & android:layout_gravity ]
官方說明 :
編譯應用程式後,aapt 會產生 R 類別。此類別內含 res/ 目錄中所有資源的資源 ID。 每一種資源類型都有 R 子類別 (例如,所有可繪項目資源的 R.drawable),而這種類型的每一種資源都有靜態整數 (例如,R.drawable.icon)。 此整數就是資源 ID,您可以用於擷取資源。
Project : 每個 Project 可以有多個 Module.
官方說明 : A project in Android Studio contains everything that defines your workspace for an app, from source code and assets, to test code and build configurations. When you start a new project, Android Studio creates the necessary structure for all your files and makes them visible in the Project window on the left side of the IDE (click View > Tool Windows > Project).