[ 基本使用狀況 ]

  • 畫面更新只能在主執行緒中,因此如果在其它執行緒中有需要更新畫面,那就需要回到主執行緒。
  • 從其它執行緒回到主執行緒,需使用 Handler。
  • 主執行緒(UI執行緒)不允許執行需要長時間的動作,否則會產生 ANR(Application is Not Responding),因此就要使用其它執行緒,但結果需要更新畫面,因此就要用 Handler。

[ 使用方法 ]

jsky 發表在 痞客邦 留言(0) 人氣()

[ NetworkOnMainThreadException ]

 

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

Module : 

官方說明 : A module is a collection of source files and build settings that allow you to divide your project into discrete units of functionality.

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

[ Intent / 意圖 ]

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

[ Reference ]

[ android:gravity & android:layout_gravity ]

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

依據不同的事件會有不同的使用方法

  • 利用事件監聽器 (Event Listeners),包含下面幾個事件 : 
    • onClick()
文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

[ 初學 ]

 

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

官方說明 :

編譯應用程式後,aapt 會產生 R 類別。此類別內含 res/ 目錄中所有資源的資源 ID。 每一種資源類型都有 R 子類別 (例如,所有可繪項目資源的 R.drawable),而這種類型的每一種資源都有靜態整數 (例如,R.drawable.icon)。 此整數就是資源 ID,您可以用於擷取資源。

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

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).

文章標籤

jsky 發表在 痞客邦 留言(0) 人氣()

[ 說明 ]

  • 把函式宣告成一種型態,讓函式可像變數一樣使用,如指定不同的處理函式把處理函式當作當作參數傳遞

 

jsky 發表在 痞客邦 留言(0) 人氣()

1 2