1.
線性布局(LinerLayout)
1)
android:orientation(設定方向的屬性)兩個方向的重要屬性(vertical,horizontal)
2)
方向上的比重屬性(layout_weight)
3)
layout_gravity和gravity的差別
2.
相對布局(RealateiveLayout)
1)
控件位置靈活多變的
2)
控件的屬性比較多,但都是有規律可循的,是以結合案例多練習,不難記憶這些屬性。
3.
表格布局(TableLayout)
4.
幀布局(FrameLayout)
5.
百分比布局(Percent RealateiveLayout,Perent
FrameLayout)
6.
限制布局(ContrainerLayout)
7.
自定義控件
1)
建立一個布局
2)
自定義的布局,做成自定義控件
3)
在我們需要的地方引用自定義控件
4)
自定義對話框
a)
設定布局(dialog_layout)
b)
設定Style(style.xml)
c)
自定義Dialog(繼承Android自帶的Dialog,實作自定義的,為相關的按鈕設定點選事件
d)
顯示show();
8.
List
View
n 什麼是List View
n 如何實作List View
n 建立List View視圖
n Adapter(Java類)【最簡單的ArrayAdapter,它一行隻能顯示一個空間,如果想顯示多個,需要自定義Adapter
n 準備資料
n List View應用場景
n 自定義實作Adapter
n (優化)ListViewItem視圖緩存(hodeview)
n 定義List View的Header
n 給每一個Item添加監聽事件(長按點選事件)
n 給Item裡的控件添加監聽事件
9.
RecycleView
n 添加依賴
l 打開File —> Project
Structure或點選快捷圖示或者快捷鍵ctrl+shift+alt+s
l 選中app —> Dependencies
—> 點選加号 —> Library dependence
l 在選擇框中輸入recyclerview
l 成功添加
n 導入ListViewDemo相關檔案
l 導入ListViewDemo建立的Hero和HeroList源檔案
l 導入ListViewDemo的資源檔案(圖檔檔案)
l 導入ListViewDemo的item布局檔案
n 建立RecyclerView布局檔案
n 建立Adapter
10.
制作Nine-Patch
11.
Android日志工具的使用
本文位址:https://blog.csdn.net/qasdfght/article/details/107162474