gliyao / Android-Learning-Note

一些Android的Open Source筆記及簡單介紹,大部分都是由這篇A Deep Dive into Open Source Android Development整理出來的,後續會慢慢整理這些Open Source怎麼安裝與使用的筆記,如果有錯誤在請大家指正。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android-Learning-Note

這個筆記大部分都是由這篇A Deep Dive into Open Source Android Development整理出來的,後續會慢慢整理這些Open Source怎麼安裝與使用的筆記,如果有錯誤在請大家指正。

#UI and Compatibility ##ActionBarSherlock

  • 網址 - http://actionbarsherlock.com/
  • 描述 - Action bar是android 3.0才開始有的功能,而ActionBarSherlock則是把該功能支援到先前的Android版本。
    • Split Action Bar - 當你的actionBarButton太多的時候,會自動轉成tab
    • Contextual Action Bars - 根據User的動作(狀態),改變actionBar給的樣式
  • 參考 - http://www.xue5.com/Mobile/Android/688706.html

Steps

  1. Add library - 右鍵 > Properites > Android > Add..
  2. Remove support-v4 - 把android-support-v4移除
  3. Modify AndroidManifes.xml
<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />

<uses-feature
    android:name="android.hardware.touchscreen"
    android:required="false" />
android:theme="@style/Theme.Sherlock" 
<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.Sherlock" >
  1. 修改相對硬類別
  • [class]
    • android.app.Activity -> com.actionbarsherlock.app.SherlockActivity
    • android.app.Fragment -> android.support.v4.app.Fragment
    • android.app.FragmentTransaction -> android.support.v4.app.FragmentTransaction
    • android.view.Menu -> com.actionbarsherlock.view.Menu
    • android.view.MenuItem -> com.actionbarsherlock.view.MenuItem
  • [functions]
    • getFragmentManager -> getSupportFragmentManager
    • getMenuInflater -> getSupportMenuInflater
    • getActionBar -> getSupportActionBar

##HoloEverywhere

##NineOldAndroids

ObjectAnimator.foFloat(myObject, "translationY", -myObject.getHeight()).start();

##UnifiedPreference

##Android Support Package Google自己提供的向下相容元件

  • Fragment
  • ViewPager, PagerTileStrip, PageTabStrip
  • Notification - 更多樣式的notification
  • Loader
  • LruCache

##Android MenuDrawer

##SimpleMenuDrawer

在Activity.onCreate 設定物件

protected void onCreate(Bundle data) {
    super.onCreate( data );
    setContentView( R.layout.main );

    mSlidingMenu = new SimpleSideDrawer( this );
    mSlidingMenu.setLeftBehindContentView( R.layout.behind_menu_left );
}

宣告右側menu

mSlidingMenu.setRightBehindContentView( R.layout.behind_menu_right )

開關menu

mSlidingMenu.toggleDrawer();

##Android-PullToRefresh

##Polaris

##Crouton

##Android-Query

#Caching and Network ##DisLruCache

  • 描述 - 本來只有3.0以後才有

##Two Level Lru Cache

##Android Image Loader

##Http Response Cache

##Http-Request

HttpRequest.get("http://google.com").receive(System.out);

#Concurrency and Communication ##Tape

##Otto

#Data Representation and Processing ##GSON

##Jackson JSON Processor

##Json-Path

String author = JsonPath.read(json, "$.store.book[1].author);

##jOOX - Java Object Oriented XML

##JSoup

##OrmLite

##Google Guava

#Dependency Injection ##Android Annotations

##RoboGuice

##Dagger

#Testing ##Android Test Framework

##Robotium

##Mochito

##Robolectric

#User Feedback ##ACRA

##BugSense/Crittercism

##Google Analytics for Android

#Bootstrap Project Generator ##Android Bootstrap

##AndroidKickStartR

#Tools ##Android Asset Studio

##Subtle Patterns

##Charles

#Others

Library Project Directory Structure

  • org.apche.maven.archetypes/maven-archetype-quickstart
  • de.akquient.android.archetypes/androi-release

#Why open source? ##Code Quality and Style

##Inclusion of Examples

##Documentation

  • maven-javadoc-plogin

##Continuous Integration

##Site Setup

##Downloadable Published Packages

About

一些Android的Open Source筆記及簡單介紹,大部分都是由這篇A Deep Dive into Open Source Android Development整理出來的,後續會慢慢整理這些Open Source怎麼安裝與使用的筆記,如果有錯誤在請大家指正。