鍍金池/ 教程/ Android/ <a rel="nofollow" href="http://developer.android.com/training/in
Launch mode 和 Intent flags專題
Canvas &amp; Drawables
UTAustinX_UT.9.01x: Effective Thinking Through Mathematics
《JavaScript 語言精粹》
Memory leak專題
React基礎
《Test Driven Development: By Example》一書
Developer tools
安卓開發(fā)技能樹
<a rel="nofollow" href="https://mp.weixin.qq.com/s?__biz=MzA3NDM
Best Practices for Interaction and Engagement
各個安卓版本引入的主要新特性
Building Apps with Connectivity &amp; the Cloud
List.toArray()再強轉是一定會失敗的
深入Android frameworks
Google dev 100 days系列視頻
Building Apps with Contacts &amp; Sign-In
關系型數(shù)據(jù)庫設計范式
《App研發(fā)錄》一書
REST API設計
Google IO 2015摘要
自定義View/ViewGroup以及高性能實現(xiàn)自定義UI
安卓系統(tǒng)點擊事件處理
《50 Android Hacks》一書
Building Apps with Content Sharing
Flux基礎
<a rel="nofollow" href="http://developer.android.com/training/in
依賴注入(以Dagger 2為例)
Java同步機制
Java對象內存的使用情況
JSR133(Java memory model)
Google官方Material Design手冊(<a rel="nofollow" href="http://develop
Futurice公司安卓團隊的建議
安卓性能優(yōu)化
  • 1.
Best Practices for Performance
<a rel="nofollow" href="http://www.vogella.com/tutorials/Android
<a rel="nofollow" href="http://blog.danlew.net/2014/11/19/styles
Handling Runtime Changes
<a rel="nofollow" href="http://www.vogella.com/tutorials/Android
Building Apps with Graphics &amp; Animation
<a rel="nofollow" href="http://tools.android.com/tech-docs/new-b
Android項目架構
MVP(Model-View-Presenter)模式
<a rel="nofollow" href="http://www.infoq.com/cn/es6-in-depth/"">
《Android源碼設計模式解析與實戰(zhàn)》一書
Rx在Android中的最佳實踐
函數(shù)調用時,傳遞參數(shù)應該是不可變的(Immutable)
ProGuard
面向對象六大原則(SOLID+)
深入理解Java虛擬機
深入Java深淺拷貝、immutable、unmodifiable
Best Practices for User Input
UI上的一些高效方式/最佳實踐
<a rel="nofollow" href="https://blog.stylingandroid.com/ripples-
Best Practices for User Interface
安卓測試驅動開發(fā)/安卓測試驗證
暗時間:學會正確思考
技術筆記
Aspect Oriented Programming(AOP)
Best Practices for Background Jobs
安卓系統(tǒng)動效專題
Feed系統(tǒng)的設計
Data binding(MVVM,Model-View-ViewModel)
Effective Java一書筆記
<a rel="nofollow" href="http://developer.android.com/training/in
Rx (Reactive eXtention)
MultiDex專題
一些很棒的點子
WebRTC

<a rel="nofollow" href="http://developer.android.com/training/in

Getting Started

  • Styling the Action Bar

    • ActionBar可以有tab,也可以有分離的底部bar,用于顯示action items
    • 使用Theme
      • Theme.Holo,暗黑系主題
      • Theme.Holo.Light,光明系主題
      • Theme.Holo.Light.DarkActionBar,光明系主題,暗黑系ActionBar
      • <application android:theme="@android:style/Theme.Holo.Light" ... />
      • 使用support library時
        • Theme.AppCompat,暗黑系
        • Theme.AppCompat.Light
        • Theme.AppCompat.Light.DarkActionBar
      • Android-Action-Bar-Icons
    • 自定義背景

      • standard: android:actionBarStyle ==> android:background
      • support: actionBarStyle ==> background
      • 示例

          <?xml version="1.0" encoding="utf-8"?>
          <resources>
              <!-- the theme applied to the application or activity -->
              <style name="CustomActionBarTheme"
                  parent="@style/Theme.AppCompat.Light.DarkActionBar">
                  <item name="android:actionBarStyle">@style/MyActionBar</item>
        
                  <!-- Support library compatibility -->
                  <item name="actionBarStyle">@style/MyActionBar</item>
              </style>
        
              <!-- ActionBar styles -->
              <style name="MyActionBar"
                  parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
                  <item name="android:background">@drawable/actionbar_background</item>
        
                  <!-- Support library compatibility -->
                  <item name="background">@drawable/actionbar_background</item>
              </style>
          </resources>
    • 自定義文字顏色

      • standard
        • Action bar title: android:actionBarStyle ==> android:titleTextStyle ==> android:textColor
        • Action bar tabs: android:actionBarTabTextStyle ==> android:textColor
        • Action buttons: android:actionMenuTextColor
      • support: 規(guī)則一樣,去掉android:前綴(android:textColor不需要去掉前綴)
      • 示例

        <?xml version="1.0" encoding="utf-8"?>
        <resources>
          <!-- the theme applied to the application or activity -->
          <style name="CustomActionBarTheme"
              parent="@style/Theme.AppCompat">
              <item name="android:actionBarStyle">@style/MyActionBar</item>
              <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
              <item name="android:actionMenuTextColor">@color/actionbar_text</item>
        
              <!-- Support library compatibility -->
              <item name="actionBarStyle">@style/MyActionBar</item>
              <item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>
              <item name="actionMenuTextColor">@color/actionbar_text</item>
          </style>
        
          <!-- ActionBar styles -->
          <style name="MyActionBar"
              parent="@style/Widget.AppCompat.ActionBar">
              <item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
        
              <!-- Support library compatibility -->
              <item name="titleTextStyle">@style/MyActionBarTitleText</item>
          </style>
        
          <!-- ActionBar title text -->
          <style name="MyActionBarTitleText"
              parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
              <item name="android:textColor">@color/actionbar_text</item>
              <!-- The textColor property is backward compatible with the Support Library -->
          </style>
        
          <!-- ActionBar tabs text -->
          <style name="MyActionBarTabText"
              parent="@style/Widget.AppCompat.ActionBar.TabText">
              <item name="android:textColor">@color/actionbar_text</item>
              <!-- The textColor property is backward compatible with the Support Library -->
          </style>
        </resources>
    • Customize the Tab Indicator(圖標/左側按鈕)

      • standard: android:actionBarTabStyle ==> android:background
      • 示例

        <?xml version="1.0" encoding="utf-8"?>
        <resources>
          <!-- the theme applied to the application or activity -->
          <style name="CustomActionBarTheme"
              parent="@style/Theme.AppCompat">
              <item name="android:actionBarTabStyle">@style/MyActionBarTabs</item>
        
              <!-- Support library compatibility -->
              <item name="actionBarTabStyle">@style/MyActionBarTabs</item>
          </style>
        
          <!-- ActionBar tabs styles -->
          <style name="MyActionBarTabs"
              parent="@style/Widget.AppCompat.ActionBar.TabView">
              <!-- tab indicator -->
              <item name="android:background">@drawable/actionbar_tab_indicator</item>
        
              <!-- Support library compatibility -->
              <item name="background">@drawable/actionbar_tab_indicator</item>
          </style>
        </resources>
    • ActionBar全部style屬性
    • ActionBar Style Generator
  • Overlaying the Action Bar

    • hide/show可以控制隱藏/顯示,但是直接使用會導致Activity重新layout
    • 使用overlay mode可以避免重新layout,而使用帶有透明度的ActionBar可以使得ActionBar底部的View也可見
    • 起用overlay mode

      <resources>
          <!-- the theme applied to the application or activity -->
          <style name="CustomActionBarTheme"
              parent="@android:style/Theme.AppCompat">
              <item name="android:windowActionBarOverlay">true</item>
      
              <!-- Support library compatibility -->
              <item name="windowActionBarOverlay">true</item>
          </style>
      </resources>
    • 設置root layout的頂部邊距,使得其完全可見
      • android:paddingTop="?android:attr/actionBarSize"
      • android:paddingTop="?attr/actionBarSize"
  • 多語言支持:創(chuàng)建/values/strings.xml,/values-es/strings.xml,/values-fr/strings.xml等資源文件夾,其中的資源定義為相同的id,則引用時會自動根據(jù)系統(tǒng)設置語言選擇對應文件夾下的資源
  • 多尺寸支持:drawable-xhdpidrawable-hdpi/...等等尺寸相關的資源
  • 多系統(tǒng)版本支持
    • minSdkVersion,targetSdkVersion
    • 運行時檢查:Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
  • Fragment之間通信
    • 通過Activity間接實現(xiàn),Activity實現(xiàn)接口,F(xiàn)ragment獲?。?code>getActivity())、cast、調用
    • EventBus