對于Android開發,适配主要指下面3個方面:
1.語言适配
國際化,最基本的方法是建立多個string.xml檔案。
另外,肯定有其它國際化的方法 。
2.螢幕适配(包括layout和bitmaps适配)
3.版本适配(在低版本平台上運作高版本API)
使用Android Support Library這個支援庫
The Android Support Library package is a set of code libraries(一系列代碼庫的集合)
----- v4 Support Library
如ViewPager、Fragment
----- Multidex Support Library
解決內建sdk重複類的問題
----- v7 Support Libraries
|------v7 appcompat library
如ActionBar,AppcompatActivity
|------v7 cardview library
|-----v7 gridlayout library
|------v7 recyclerview library
----- V8、V13、V17,所謂的V指的就是Version。
----- Annotations Support Library
----- Design Support Library
相容性更廣,直接可以向下相容到Android 2.2
支援Meterial Design,做出更炫的界面。
對于MeterialDesign裡的各個元件作了詳細的介紹
TextInputLayout 相當于一個ImageView
NavigationView 導航界面的(封裝了頭布局和菜單布局)
AppBarLayout 對ToolBar和TabLayout的封裝
CollapsingToolbarLayout 可以折疊的ToolBar
本文轉自屠夫章哥 51CTO部落格,原文連結:http://blog.51cto.com/4259297/1715677,如需轉載請自行聯系原作者