Android 開源控件與經常使用開發框架開發工具類

Android的加載動畫AVLoadingIndicatorView

這裏寫圖片描述

項目地址:javascript

https://github.com/81813780/AVLoadingIndicatorView

首先,在 build.gradle.中添加;php

dependencies { compile 'com.wang.avi:library:2.1.3' }

而後在xml中使用;css

<com.wang.avi.AVLoadingIndicatorView android:id="@+id/avi" android:layout_width="wrap_content" //or your custom size android:layout_height="wrap_content" //or your custom size style="@style/AVLoadingIndicatorView"// or AVLoadingIndicatorView.Large or AVLoadingIndicatorView.Small android:visibility="visible" //visible or gone app:indicatorName="BallPulseIndicator"//Indicator Name app:indicatorColor="your color" />

也能夠經過代碼顯示或者隱藏;html

void startAnim(){
        avi.show(); // or avi.smoothToShow(); } void stopAnim(){ avi.hide(); // or avi.smoothToHide(); }

QuantityView 相似購物車數量調節:

效果圖:html5

這裏寫圖片描述

項目在GitHub上的地址:java

https://github.com/himanshu-soni/QuantityView

項目使用:python

在gradle中添加mysql

compile 'me.himanshusoni.quantityview:quantity-view:1.1.3'linux

在XML中添加布局:android

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/md_white_1000" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Default" android:textAppearance="?android:textAppearanceLarge" /> <me.himanshusoni.quantityview.QuantityView android:id="@+id/quantityView_default" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" app:qv_quantity="10" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:text="Custom 1" android:textAppearance="?android:textAppearanceLarge" /> <me.himanshusoni.quantityview.QuantityView android:id="@+id/quantityView_custom_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" app:qv_addButtonText="ADD MORE" app:qv_addButtonTextColor="@color/md_green_500" app:qv_maxQuantity="20" app:qv_quantity="15" app:qv_removeButtonText="REMOVE" app:qv_removeButtonTextColor="@color/md_red_500" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:text="Custom 2" android:textAppearance="?android:textAppearanceLarge" /> <me.himanshusoni.quantityview.QuantityView android:id="@+id/quantityView_custom_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" app:qv_addButtonBackground="@drawable/add_selector" app:qv_addButtonTextColor="@color/md_white_1000" app:qv_quantity="20" app:qv_removeButtonBackground="@drawable/remove_selector" app:qv_removeButtonTextColor="@color/md_white_1000" /> </LinearLayout> 

Java中的使用代碼:

public class SlideDateTimeActivity extends FragmentActivity { @Bind(R.id.button) Button button; private SimpleDateFormat mFormatter = new SimpleDateFormat("MMMM dd yyyy hh:mm aa"); private Button mButton; private SlideDateTimeListener listener = new SlideDateTimeListener() { @Override public void onDateTimeSet(Date date) { Toast.makeText(SlideDateTimeActivity.this, mFormatter.format(date), Toast.LENGTH_SHORT).show(); } // Optional cancel listener @Override public void onDateTimeCancel() { Toast.makeText(SlideDateTimeActivity.this, "Canceled", Toast.LENGTH_SHORT).show(); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_slide_date_time_picker); ButterKnife.bind(this); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new SlideDateTimePicker.Builder(getSupportFragmentManager()) .setListener(listener) .setInitialDate(new Date()) //.setMinDate(minDate) //.setMaxDate(maxDate) //.setIs24HourTime(true) //.setTheme(SlideDateTimePicker.HOLO_DARK) //.setIndicatorColor(Color.parseColor("#990000")) .build() .show(); } }); } } 

 


Justified 實現Textview和Edittext文字左右對齊。

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/programingjd/justified

項目使用:

在gradle中添加

compile 'com.uncopt:android.justified:1.0'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.zerom.mtest.Justifiedtextview"> <me.biubiubiu.justifytext.library.JustifyTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/margin_20" android:text="預覽版目前已經包括Android Wear最新API,這些新API可讓開發者以語音的方式定製和擴展他們的通知。其提供的仿真器可用於預覽包括方形和圓形可穿戴設備上出現的通知方式,與此同時,谷歌也但願在將來幾個月內繼續爲Android Wear設備提供新的API和功能。" /> <me.biubiubiu.justifytext.library.JustifyTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/margin_20" android:text="Tests whether this string matches the given regularExpression. This method returns true only if the regular expression matches the entire input string. A common mistake is to assume that this method behaves like contains(CharSequence); if you want to match anywhere within the input string, you need to add .* to the beginning and end of your regular expression. See matches(String, CharSequence)." /> </LinearLayout>

android-shapeLoadingView實現高仿新版58 加載動畫

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/zzz40500/android-shapeLoadingView

項目使用:

在gradle中添加

compile 'com.github.zzz40500:android-shapeLoadingView:1.0.3.2'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".ShapeLoadingctivity"> <com.mingle.widget.LoadingView android:id="@+id/loadView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" app:loadingText="加載中..." /> </RelativeLayout> 

 


SlideDateTimePicker實現時間選擇器,能夠選擇年月日小時分鐘

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/jjobes/SlideDateTimePicker

項目使用:

添加依賴包;

Java中的使用代碼:

public class SlideDateTimeActivity extends FragmentActivity { @Bind(R.id.button) Button button; private SimpleDateFormat mFormatter = new SimpleDateFormat("MMMM dd yyyy hh:mm aa"); private Button mButton; private SlideDateTimeListener listener = new SlideDateTimeListener() { @Override public void onDateTimeSet(Date date) { Toast.makeText(SlideDateTimeActivity.this, mFormatter.format(date), Toast.LENGTH_SHORT).show(); } // Optional cancel listener @Override public void onDateTimeCancel() { Toast.makeText(SlideDateTimeActivity.this, "Canceled", Toast.LENGTH_SHORT).show(); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_slide_date_time_picker); ButterKnife.bind(this); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new SlideDateTimePicker.Builder(getSupportFragmentManager()) .setListener(listener) .setInitialDate(new Date()) //.setMinDate(minDate) //.setMaxDate(maxDate) //.setIs24HourTime(true) //.setTheme(SlideDateTimePicker.HOLO_DARK) //.setIndicatorColor(Color.parseColor("#990000")) .build() .show(); } }); } }

Labelview實現標籤功能,在控件上面展現斜的文字

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/linger1216//labelview

項目使用:

在gradle中添加

compile 'com.github.linger1216:labelview:v1.1.0'

在XML中添加布局:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:orientation="vertical" android:layout_height="wrap_content"> <com.lid.lib.LabelButtonView android:id="@+id/labelbutton" android:layout_width="200dp" android:layout_height="48dp" android:background="#03a9f4" android:gravity="center" android:text="Button" android:textColor="#ffffff" app:label_backgroundColor="#C2185B" app:label_distance="20dp" app:label_height="20dp" app:label_orientation="RIGHT_TOP" app:label_text="HD" app:label_textSize="12sp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="24dp"> <com.lid.lib.LabelImageView android:id="@+id/image1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:scaleType="centerCrop" android:src="@mipmap/image1" app:label_backgroundColor="#C2185B" app:label_orientation="LEFT_TOP" app:label_text="CHINA" /> <com.lid.lib.LabelImageView android:id="@+id/image2" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:scaleType="centerCrop" android:src="@mipmap/image2" app:label_backgroundColor="#C2185B" app:label_orientation="RIGHT_TOP" app:label_text="KUNQU" /> </LinearLayout> <com.lid.lib.LabelTextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="48dp" android:layout_gravity="center" android:layout_marginTop="8dp" android:background="#212121" android:gravity="center" android:padding="16dp" android:text="TextView" android:textColor="#ffffff" app:label_backgroundColor="#03A9F4" app:label_distance="15dp" app:label_orientation="LEFT_TOP" app:label_text="POP" app:label_textSize="10sp" /> <com.lid.lib.LabelButtonView android:id="@+id/click" android:layout_width="match_parent" android:layout_height="48dp" android:layout_gravity="center_horizontal" android:layout_marginTop="8dp" android:background="#E91E63" android:gravity="center" android:text="ListView demo" android:textColor="#ffffff" app:label_backgroundColor="#03A9F4" app:label_distance="15dp" app:label_orientation="RIGHT_TOP" app:label_text="click" app:label_textSize="10sp" /> <com.lid.lib.LabelButtonView android:id="@+id/click11" android:layout_width="match_parent" android:layout_height="48dp" android:layout_gravity="center_horizontal" android:layout_marginTop="8dp" android:background="#E91E63" android:gravity="center" android:text="recyclerview demo" android:textColor="#ffffff" app:label_backgroundColor="#03A9F4" app:label_distance="15dp" app:label_orientation="RIGHT_TOP" app:label_text="click" app:label_textSize="10sp" /> </LinearLayout> </ScrollView>

PullZoomView實現相似微信,下拉listview,頂部圖片放大效果

項目在GitHub上的地址:

https://github.com/Frank-Zhu/PullZoomView

項目使用:

在gradle中添加

compile 'com.github.frank-zhu:pullzoomview:1.0.0'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <com.zerom.mtest.parallaxListView.ParallaxScollListView android:id="@+id/layout_listview" android:layout_width="match_parent" android:layout_height="match_parent" android:cacheColorHint="@null" android:duplicateParentState="true" android:scrollingCache="false" android:headerDividersEnabled="false" android:footerDividersEnabled="false" android:overScrollMode="never" android:scrollbars="none" /> </RelativeLayout>

Java中的代碼:

ParallaxScollListView.class

public class ParallaxScollListView extends ListView implements AbsListView.OnScrollListener { public final static double NO_ZOOM = 1; public final static double ZOOM_X2 = 2; private ImageView mImageView; private int mDrawableMaxHeight = -1; private int mImageViewHeight = -1; private int mDefaultImageViewHeight = 0; private double mZoomRatio; private interface OnOverScrollByListener { public boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent); } private interface OnTouchEventListener { public void onTouchEvent(MotionEvent ev); } public ParallaxScollListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context); } public ParallaxScollListView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public ParallaxScollListView(Context context) { super(context); init(context); } public void init(Context context) { mDefaultImageViewHeight = context.getResources().getDimensionPixelSize(R.dimen.size_default_height); } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); initViewsBounds(mZoomRatio); } @Override public void onScrollStateChanged(AbsListView view, int scrollState) { } @Override protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { boolean isCollapseAnimation = false; isCollapseAnimation = scrollByListener.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX, scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent) || isCollapseAnimation; return isCollapseAnimation || super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX, scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent); } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { } @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); View firstView = (View) mImageView.getParent(); // firstView.getTop < getPaddingTop means mImageView will be covered by top padding, // so we can layout it to make it shorter if (firstView.getTop() < getPaddingTop() && mImageView.getHeight() > mImageViewHeight) { mImageView.getLayoutParams().height = Math.max(mImageView.getHeight() - (getPaddingTop() - firstView.getTop()), mImageViewHeight); // to set the firstView.mTop to 0, // maybe use View.setTop() is more easy, but it just support from Android 3.0 (API 11) firstView.layout(firstView.getLeft(), 0, firstView.getRight(), firstView.getHeight()); mImageView.requestLayout(); } } @Override public boolean onTouchEvent(MotionEvent ev) { touchListener.onTouchEvent(ev); return super.onTouchEvent(ev); } public void setParallaxImageView(ImageView iv) { mImageView = iv; mImageView.setScaleType(ImageView.ScaleType.CENTER_CROP); } private void initViewsBounds(double zoomRatio) { if (mImageViewHeight == -1) { mImageViewHeight = mImageView.getHeight(); if (mImageViewHeight <= 0) { mImageViewHeight = mDefaultImageViewHeight; } double ratio = ((double) mImageView.getDrawable().getIntrinsicWidth()) / ((double) mImageView.getWidth()); mDrawableMaxHeight = (int) ((mImageView.getDrawable().getIntrinsicHeight() / ratio) * (zoomRatio > 1 ? zoomRatio : 1)); } } public void setZoomRatio(double zoomRatio) { mZoomRatio = zoomRatio; } private OnOverScrollByListener scrollByListener = new OnOverScrollByListener() { @Override public boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { if (mImageView.getHeight() <= mDrawableMaxHeight && isTouchEvent) { if (deltaY < 0) { if (mImageView.getHeight() - deltaY / 2 >= mImageViewHeight) { mImageView.getLayoutParams().height = mImageView.getHeight() - deltaY / 2 < mDrawableMaxHeight ? mImageView.getHeight() - deltaY / 2 : mDrawableMaxHeight; mImageView.requestLayout(); } } else { if (mImageView.getHeight() > mImageViewHeight) { mImageView.getLayoutParams().height = mImageView.getHeight() - deltaY > mImageViewHeight ? mImageView.getHeight() - deltaY : mImageViewHeight; mImageView.requestLayout(); return true; } } } return false; } }; private OnTouchEventListener touchListener = new OnTouchEventListener() { @Override public void onTouchEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_UP) { if (mImageViewHeight - 1 < mImageView.getHeight()) { ResetAnimimation animation = new ResetAnimimation( mImageView, mImageViewHeight); animation.setDuration(300); mImageView.startAnimation(animation); } } } }; public class ResetAnimimation extends Animation { int targetHeight; int originalHeight; int extraHeight; View mView; protected ResetAnimimation(View view, int targetHeight) { this.mView = view; this.targetHeight = targetHeight; originalHeight = view.getHeight(); extraHeight = this.targetHeight - originalHeight; } @Override protected void applyTransformation(float interpolatedTime, Transformation t) { int newHeight; newHeight = (int) (targetHeight - extraHeight * (1 - interpolatedTime)); mView.getLayoutParams().height = newHeight; mView.requestLayout(); } } } 

ParallaxListViewActivity.class

public class ParallaxListViewActivity extends AppCompatActivity { @Bind(R.id.layout_listview) ParallaxScollListView layoutListview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_parallax_list_view); ButterKnife.bind(this); View header = LayoutInflater.from(this).inflate(R.layout.listview_header, null); ImageView mImageView = (ImageView) header.findViewById(R.id.layout_header_image); layoutListview.setZoomRatio(ParallaxScollListView.ZOOM_X2); layoutListview.setParallaxImageView(mImageView); layoutListview.addHeaderView(header); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, new String[]{ "First Item", "Second Item", "Third Item", "Fifth Item", "Sixth Item", "Seventh Item", "Eighth Item", "Ninth Item", "Tenth Item", "....." } ); layoutListview.setAdapter(adapter); } } 

 


SwipeMenuListView實現listview滑動刪除。

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/baoyongzhang/SwipeMenuListView

項目使用:

在gradle中添加

compile 'com.baoyz.swipemenulistview:library:1.3.0'

有兩種側滑刪除的列表,一種是側滑內容都同樣的列表,SimpleActivity.class; 
另外一種是側滑內容不同的列表,DifferentMenuActivity.class;

SimpleActivity.class

public class SimpleActivity extends AppCompatActivity { private List<ApplicationInfo> mAppList; private AppAdapter mAdapter; private SwipeMenuListView mListView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_simple); mAppList = getPackageManager().getInstalledApplications(0); mListView = (SwipeMenuListView) findViewById(R.id.listView); mAdapter = new AppAdapter(); mListView.setAdapter(mAdapter); // step 1. create a MenuCreator SwipeMenuCreator creator = new SwipeMenuCreator() { @Override public void create(SwipeMenu menu) { // create "open" item SwipeMenuItem openItem = new SwipeMenuItem( getApplicationContext()); // set item background openItem.setBackground(new ColorDrawable(Color.rgb(0xC9, 0xC9, 0xCE))); // set item width openItem.setWidth(dp2px(90)); // set item title openItem.setTitle("Open"); // set item title fontsize openItem.setTitleSize(18); // set item title font color openItem.setTitleColor(Color.WHITE); // add to menu menu.addMenuItem(openItem); // create "delete" item SwipeMenuItem deleteItem = new SwipeMenuItem( getApplicationContext()); // set item background deleteItem.setBackground(new ColorDrawable(Color.rgb(0xF9, 0x3F, 0x25))); // set item width deleteItem.setWidth(dp2px(90)); // set a icon deleteItem.setIcon(R.mipmap.ic_delete); // add to menu menu.addMenuItem(deleteItem); } }; // set creator mListView.setMenuCreator(creator); // step 2. listener item click event mListView.setOnMenuItemClickListener(new SwipeMenuListView.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(int position, SwipeMenu menu, int index) { ApplicationInfo item = mAppList.get(position); switch (index) { case 0: // open open(item); break; case 1: // delete // delete(item); mAppList.remove(position); mAdapter.notifyDataSetChanged(); break; } return false; } }); // set SwipeListener mListView.setOnSwipeListener(new SwipeMenuListView.OnSwipeListener() { @Override public void onSwipeStart(int position) { // swipe start } @Override public void onSwipeEnd(int position) { // swipe end } }); // set MenuStateChangeListener mListView.setOnMenuStateChangeListener(new SwipeMenuListView.OnMenuStateChangeListener() { @Override public void onMenuOpen(int position) { } @Override public void onMenuClose(int position) { } }); // other setting // listView.setCloseInterpolator(new BounceInterpolator()); // test item long click mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { @Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { Toast.makeText(getApplicationContext(), position + " long click", Toast.LENGTH_SHORT).show(); return false; } }); } private void delete(ApplicationInfo item) { // delete app try { Intent intent = new Intent(Intent.ACTION_DELETE); intent.setData(Uri.fromParts("package", item.packageName, null)); startActivity(intent); } catch (Exception e) { } } private void open(ApplicationInfo item) { // open app Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null); resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER); resolveIntent.setPackage(item.packageName); List<ResolveInfo> resolveInfoList = getPackageManager() .queryIntentActivities(resolveIntent, 0); if (resolveInfoList != null && resolveInfoList.size() > 0) { ResolveInfo resolveInfo = resolveInfoList.get(0); String activityPackageName = resolveInfo.activityInfo.packageName; String className = resolveInfo.activityInfo.name; Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); ComponentName componentName = new ComponentName( activityPackageName, className); intent.setComponent(componentName); startActivity(intent); } } class AppAdapter extends BaseAdapter { @Override public int getCount() { return mAppList.size(); } @Override public ApplicationInfo getItem(int position) { return mAppList.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = View.inflate(getApplicationContext(), R.layout.item_list_app, null); new ViewHolder(convertView); } ViewHolder holder = (ViewHolder) convertView.getTag(); ApplicationInfo item = getItem(position); holder.iv_icon.setImageDrawable(item.loadIcon(getPackageManager())); holder.tv_name.setText(item.loadLabel(getPackageManager())); holder.iv_icon.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(SimpleActivity.this, "iv_icon_click", Toast.LENGTH_SHORT).show(); } }); holder.tv_name.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(SimpleActivity.this,"iv_icon_click",Toast.LENGTH_SHORT).show(); } }); return convertView; } class ViewHolder { ImageView iv_icon; TextView tv_name; public ViewHolder(View view) { iv_icon = (ImageView) view.findViewById(R.id.iv_icon); tv_name = (TextView) view.findViewById(R.id.tv_name); view.setTag(this); } } } private int dp2px(int dp) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics()); } }

DifferentMenuActivity.class

public class DifferentMenuActivity extends AppCompatActivity { private List<ApplicationInfo> mAppList; private AppAdapter mAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_simple); mAppList = getPackageManager().getInstalledApplications(0); SwipeMenuListView listView = (SwipeMenuListView) findViewById(R.id.listView); mAdapter = new AppAdapter(); listView.setAdapter(mAdapter); // step 1. create a MenuCreator SwipeMenuCreator creator = new SwipeMenuCreator() { @Override public void create(SwipeMenu menu) { // Create different menus depending on the view type switch (menu.getViewType()) { case 0: createMenu1(menu); break; case 1: createMenu2(menu); break; case 2: createMenu3(menu); break; } } private void createMenu1(SwipeMenu menu) { SwipeMenuItem item1 = new SwipeMenuItem( getApplicationContext()); item1.setBackground(new ColorDrawable(Color.rgb(0xE5, 0x18, 0x5E))); item1.setWidth(dp2px(90)); item1.setIcon(R.mipmap.ic_action_favorite); menu.addMenuItem(item1); SwipeMenuItem item2 = new SwipeMenuItem( getApplicationContext()); item2.setBackground(new ColorDrawable(Color.rgb(0xC9, 0xC9, 0xCE))); item2.setWidth(dp2px(90)); item2.setIcon(R.mipmap.ic_action_good); menu.addMenuItem(item2); } private void createMenu2(SwipeMenu menu) { SwipeMenuItem item1 = new SwipeMenuItem( getApplicationContext()); item1.setBackground(new ColorDrawable(Color.rgb(0xE5, 0xE0, 0x3F))); item1.setWidth(dp2px(90)); item1.setIcon(R.mipmap.ic_action_important); menu.addMenuItem(item1); SwipeMenuItem item2 = new SwipeMenuItem( getApplicationContext()); item2.setBackground(new ColorDrawable(Color.rgb(0xF9, 0x3F, 0x25))); item2.setWidth(dp2px(90)); item2.setIcon(R.mipmap.ic_action_discard); menu.addMenuItem(item2); } private void createMenu3(SwipeMenu menu) { SwipeMenuItem item1 = new SwipeMenuItem( getApplicationContext()); item1.setBackground(new ColorDrawable(Color.rgb(0x30, 0xB1, 0xF5))); item1.setWidth(dp2px(90)); item1.setIcon(R.mipmap.ic_action_about); menu.addMenuItem(item1); SwipeMenuItem item2 = new SwipeMenuItem( getApplicationContext()); item2.setBackground(new ColorDrawable(Color.rgb(0xC9, 0xC9, 0xCE))); item2.setWidth(dp2px(90)); item2.setIcon(R.mipmap.ic_action_share); menu.addMenuItem(item2); } }; // set creator listView.setMenuCreator(creator); // step 2. listener item click event listView.setOnMenuItemClickListener(new SwipeMenuListView.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(int position, SwipeMenu menu, int index) { ApplicationInfo item = mAppList.get(position); switch (index) { case 0: // open break; case 1: // delete // delete(item); mAppList.remove(position); mAdapter.notifyDataSetChanged(); break; } return false; } }); } class AppAdapter extends BaseAdapter { @Override public int getCount() { return mAppList.size(); } @Override public ApplicationInfo getItem(int position) { return mAppList.get(position); } @Override public long getItemId(int position) { return position; } @Override public int getViewTypeCount() { // menu type count return 3; } @Override public int getItemViewType(int position) { // current menu type return position % 3; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = View.inflate(getApplicationContext(), R.layout.item_list_app, null); new ViewHolder(convertView); } ViewHolder holder = (ViewHolder) convertView.getTag(); ApplicationInfo item = getItem(position); holder.iv_icon.setImageDrawable(item.loadIcon(getPackageManager())); holder.tv_name.setText(item.loadLabel(getPackageManager())); return convertView; } class ViewHolder { ImageView iv_icon; TextView tv_name; public ViewHolder(View view) { iv_icon = (ImageView) view.findViewById(R.id.iv_icon); tv_name = (TextView) view.findViewById(R.id.tv_name); view.setTag(this); } } } private int dp2px(int dp) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics()); } }

 


gif-movie-view實現播放gif圖像

項目在GitHub上的地址:

https://github.com/sbakhtiarov/gif-movie-view

項目使用:

自定義View:

GifMovieView.class

public class GifMovieView extends View { private static final int DEFAULT_MOVIEW_DURATION = 1000; private int mMovieResourceId; private Movie mMovie; private long mMovieStart; private int mCurrentAnimationTime = 0; /** * Position for drawing animation frames in the center of the view. */ private float mLeft; private float mTop; /** * Scaling factor to fit the animation within view bounds. */ private float mScale; /** * Scaled movie frames width and height. */ private int mMeasuredMovieWidth; private int mMeasuredMovieHeight; private volatile boolean mPaused = false; private boolean mVisible = true; public GifMovieView(Context context) { this(context, null); } public GifMovieView(Context context, AttributeSet attrs) { this(context, attrs, R.styleable.CustomTheme_gifMoviewViewStyle); } public GifMovieView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); setViewAttributes(context, attrs, defStyle); } private void setViewAttributes(Context context, AttributeSet attrs, int defStyle) { /** * Starting from HONEYCOMB have to turn off HW acceleration to draw * Movie on Canvas. */ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { setLayerType(View.LAYER_TYPE_SOFTWARE, null); } final TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.GifMoviewView, defStyle, R.style.Widget_GifMoviewView); mMovieResourceId = array.getResourceId(R.styleable.GifMoviewView_gif, -1); mPaused = array.getBoolean(R.styleable.GifMoviewView_paused, false); array.recycle(); if (mMovieResourceId != -1) { mMovie = Movie.decodeStream(getResources().openRawResource(mMovieResourceId)); } } public void setMovieResource(int movieResId) { this.mMovieResourceId = movieResId; mMovie = Movie.decodeStream(getResources().openRawResource(mMovieResourceId)); requestLayout(); } public void setMovie(Movie movie) { this.mMovie = movie; requestLayout(); } public Movie getMovie() { return mMovie; } public void setMovieTime(int time) { mCurrentAnimationTime = time; invalidate(); } public void setPaused(boolean paused) { this.mPaused = paused; /** * Calculate new movie start time, so that it resumes from the same * frame. */ if (!paused) { mMovieStart = android.os.SystemClock.uptimeMillis() - mCurrentAnimationTime; } invalidate(); } public boolean isPaused() { return this.mPaused; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (mMovie != null) { int movieWidth = mMovie.width(); int movieHeight = mMovie.height(); /* * Calculate horizontal scaling */ float scaleH = 1f; int measureModeWidth = MeasureSpec.getMode(widthMeasureSpec); if (measureModeWidth != MeasureSpec.UNSPECIFIED) { int maximumWidth = MeasureSpec.getSize(widthMeasureSpec); if (movieWidth > maximumWidth) { scaleH = (float) movieWidth / (float) maximumWidth; } } /* * calculate vertical scaling */ float scaleW = 1f; int measureModeHeight = MeasureSpec.getMode(heightMeasureSpec); if (measureModeHeight != MeasureSpec.UNSPECIFIED) { int maximumHeight = MeasureSpec.getSize(heightMeasureSpec); if (movieHeight > maximumHeight) { scaleW = (float) movieHeight / (float) maximumHeight; } } /* * calculate overall scale */ mScale = 1f / Math.max(scaleH, scaleW); mMeasuredMovieWidth = (int) (movieWidth * mScale); mMeasuredMovieHeight = (int) (movieHeight * mScale); setMeasuredDimension(mMeasuredMovieWidth, mMeasuredMovieHeight); } else { /* * No movie set, just set minimum available size. */ setMeasuredDimension(getSuggestedMinimumWidth(), getSuggestedMinimumHeight()); } } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); /* * Calculate left / top for drawing in center */ mLeft = (getWidth() - mMeasuredMovieWidth) / 2f; mTop = (getHeight() - mMeasuredMovieHeight) / 2f; mVisible = getVisibility() == View.VISIBLE; } @Override protected void onDraw(Canvas canvas) { if (mMovie != null) { if (!mPaused) { updateAnimationTime(); drawMovieFrame(canvas); invalidateView(); } else { drawMovieFrame(canvas); } } } /** * Invalidates view only if it is visible. * <br> * {@link #postInvalidateOnAnimation()} is used for Jelly Bean and higher. * */ private void invalidateView() { if(mVisible) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { postInvalidateOnAnimation(); } else { invalidate(); } } } /** * Calculate current animation time */ private void updateAnimationTime() { long now = android.os.SystemClock.uptimeMillis(); if (mMovieStart == 0) { mMovieStart = now; } int dur = mMovie.duration(); if (dur == 0) { dur = DEFAULT_MOVIEW_DURATION; } mCurrentAnimationTime = (int) ((now - mMovieStart) % dur); } /** * Draw current GIF frame */ private void drawMovieFrame(Canvas canvas) { mMovie.setTime(mCurrentAnimationTime); canvas.save(Canvas.MATRIX_SAVE_FLAG); canvas.scale(mScale, mScale); mMovie.draw(canvas, mLeft / mScale, mTop / mScale); canvas.restore(); } @Override public void onScreenStateChanged(int screenState) { super.onScreenStateChanged(screenState); mVisible = screenState == SCREEN_STATE_ON; invalidateView(); } @Override protected void onVisibilityChanged(View changedView, int visibility) { super.onVisibilityChanged(changedView, visibility); mVisible = visibility == View.VISIBLE; invalidateView(); } @Override protected void onWindowVisibilityChanged(int visibility) { super.onWindowVisibilityChanged(visibility); mVisible = visibility == View.VISIBLE; invalidateView(); } } 

XML中的佈局:

<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:custom="http://schemas.android.com/apk/res-auto" android:fillViewport="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#FFFFFFFF" android:gravity="center_horizontal" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <com.zerom.mtest.GifMove.GifMovieView android:id="@+id/gif1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="onGifClick" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <com.zerom.mtest.GifMove.GifMovieView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="onGifClick" custom:gif="@mipmap/gif_heart" /> <com.zerom.mtest.GifMove.GifMovieView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="onGifClick" custom:gif="@mipmap/gif_heart" /> <com.zerom.mtest.GifMove.GifMovieView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="onGifClick" custom:gif="@mipmap/gif_heart" /> <com.zerom.mtest.GifMove.GifMovieView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="onGifClick" custom:gif="@mipmap/gif_heart" /> </LinearLayout> </LinearLayout> </ScrollView>

Activity中使用:

public class GifMoveActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_gif_move); final GifMovieView gif1 = (GifMovieView) findViewById(R.id.gif1); assert gif1 != null; gif1.setMovieResource(R.mipmap.gif_heart); } public void onGifClick(View v) { GifMovieView gif = (GifMovieView) v; gif.setPaused(!gif.isPaused()); } }

 


BubbleView實現相似聊天氣泡的view

效果圖: 
這裏寫圖片描述

項目使用:

在gradle中添加

compile 'com.lguipeng.bubbleview:library:1.0.0'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="20dp" android:divider="@drawable/divider" android:gravity="center_horizontal" android:orientation="vertical" android:showDividers="middle"> <com.github.library.bubbleview.BubbleTextVew android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" android:text="Hello BubbleTextVew" android:textColor="@android:color/white" android:textSize="20sp" app:angle="8dp" app:arrowHeight="10dp" app:arrowLocation="right" app:arrowPosition="14dp" app:arrowWidth="8dp" app:bubbleColor="#7EC0EE" /> <com.github.library.bubbleview.BubbleImageView android:id="@+id/bubble_image" android:layout_width="180dp" android:layout_height="wrap_content" android:src="@drawable/girl" app:angle="6dp" app:arrowHeight="8dp" app:arrowLocation="top" app:arrowPosition="15dp" app:arrowWidth="10dp" /> <com.github.library.bubbleview.BubbleLinearLayout android:id="@+id/bubble_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" app:angle="4dp" app:arrowHeight="10dp" app:arrowLocation="left" app:arrowPosition="10dp" app:arrowWidth="8dp" app:bubbleColor="#7EC0EE"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:src="@mipmap/ic_launcher" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginRight="4dp" android:text="BubbleLinearLayout Text" android:textColor="@android:color/white" /> </com.github.library.bubbleview.BubbleLinearLayout> <com.github.library.bubbleview.BubbleTextVew android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" android:text="Hello BubbleTextVew" android:textColor="@android:color/white" app:angle="2dp" app:arrowHeight="10dp" app:arrowLocation="bottom" app:arrowPosition="10dp" app:arrowWidth="8dp" app:bubbleColor="#ff4444" /> </LinearLayout>

MaterialFavoriteButton收藏與取消收藏

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/IvBaranov/MaterialFavoriteButton

項目使用:

在gradle中添加

compile 'com.github.ivbaranov:materialfavoritebutton:0.1.2'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".MaterialFavoriteButtonActivity"> <android.support.design.widget.AppBarLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /> </android.support.design.widget.AppBarLayout> <include layout="@layout/content_main" /> </android.support.design.widget.CoordinatorLayout>

content_main.xml

<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="none" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/card_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/text_padding" android:text="Basic" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/text_padding" android:text="@string/ipsum_1" /> <com.github.ivbaranov.mfb.MaterialFavoriteButton android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </android.support.v7.widget.CardView> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/card_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/text_padding" android:text="Nice" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/text_padding" android:text="@string/ipsum_en_1914_1" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/counter_text" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_centerVertical="true" android:layout_marginLeft="@dimen/starred_margin" android:text="@string/starred" /> <TextView android:id="@+id/counter_value" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_centerVertical="true" android:layout_toRightOf="@+id/counter_text" android:layout_marginLeft="@dimen/counter_value_margin" /> <com.github.ivbaranov.mfb.MaterialFavoriteButton android:id="@+id/favorite_nice" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" app:mfb_rotation_duration="400" app:mfb_rotation_angle="216" app:mfb_bounce_duration="700" /> </RelativeLayout> </LinearLayout> </android.support.v7.widget.CardView> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/card_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/text_padding" android:text="Custom" android:textAppearance="@style/TextAppearance.AppCompat.Title" /> <com.github.ivbaranov.mfb.MaterialFavoriteButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" app:mfb_rotation_duration="700" app:mfb_rotation_angle="360" app:mfb_favorite_image="@mipmap/ic_event_available_black_24dp" app:mfb_not_favorite_image="@mipmap/ic_event_busy_black_24dp" app:mfb_animate_unfavorite="true" app:mfb_bounce_duration="0" /> </RelativeLayout> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/text_padding" android:text="@string/ipsum_2" /> </LinearLayout> </android.support.v7.widget.CardView> </LinearLayout> </ScrollView>

Activity中實現:

public class MaterialFavoriteButtonActivity extends AppCompatActivity { private TextView niceCounter; private int niceCounterValue = 37; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_material_favorite_button); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); //in the toolbar MaterialFavoriteButton toolbarFavorite = new MaterialFavoriteButton.Builder(this) // .favorite(true) .color(MaterialFavoriteButton.STYLE_WHITE) .type(MaterialFavoriteButton.STYLE_HEART) .rotationDuration(400) .create(); toolbar.addView(toolbarFavorite); toolbarFavorite.setOnFavoriteChangeListener( new MaterialFavoriteButton.OnFavoriteChangeListener() { @Override public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite) { Snackbar.make(buttonView, getString(R.string.toolbar_favorite_snack) + favorite, Snackbar.LENGTH_SHORT).show(); } }); //nice cardview niceCounter = (TextView) findViewById(R.id.counter_value); niceCounter.setText(String.valueOf(niceCounterValue)); MaterialFavoriteButton materialFavoriteButtonNice = (MaterialFavoriteButton) findViewById(R.id.favorite_nice); materialFavoriteButtonNice.setFavorite(true, false); materialFavoriteButtonNice.setOnFavoriteChangeListener( new MaterialFavoriteButton.OnFavoriteChangeListener() { @Override public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite) { if (favorite) { niceCounterValue++; } else { niceCounterValue--; } } }); materialFavoriteButtonNice.setOnFavoriteAnimationEndListener( new MaterialFavoriteButton.OnFavoriteAnimationEndListener() { @Override public void onAnimationEnd(MaterialFavoriteButton buttonView, boolean favorite) { niceCounter.setText(String.valueOf(niceCounterValue)); } }); } } 

Photoview 圖片放大縮放功能

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/chrisbanes/PhotoView

項目使用:

在gradle中添加

compile 'com.github.chrisbanes:PhotoView:1.2.6'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" tools:context="com.zerom.mtest.PhotoViewActivity"> <uk.co.senab.photoview.PhotoView android:id="@+id/pv_photoview" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@mipmap/ico_guide01" /> </LinearLayout> 

Activity中使用:

public class PhotoViewActivity extends AppCompatActivity { @Bind(R.id.pv_photoview) PhotoView pvPhotoview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_photo_view); ButterKnife.bind(this); PhotoViewAttacher photoViewAttacher = new PhotoViewAttacher(pvPhotoview); photoViewAttacher.update(); } }

Caldroid ,一個更好的Android日曆控件

效果圖: 
這裏寫圖片描述

項目在GitHub上的地址:

https://github.com/roomorama/Caldroid

項目使用:

在gradle中添加

compile 'com.roomorama:caldroid:3.0.1'

在XML中添加布局:

<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:id="@+id/calendar1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> </LinearLayout> <LinearLayout android:id="@+id/button_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/customize_button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/customize"/> <Button android:id="@+id/show_dialog_button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/show_dialog"/> </LinearLayout> <TextView android:id="@+id/textview" android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </ScrollView> 

Activity中實現:

public class CaldroidActivity extends AppCompatActivity { private boolean undo = false; private CaldroidFragment caldroidFragment; private CaldroidFragment dialogCaldroidFragment; private void setCustomResourceForDates() { Calendar cal = Calendar.getInstance(); // Min date is last 7 days cal.add(Calendar.DATE, -7); Date blueDate = cal.getTime(); // Max date is next 7 days cal = Calendar.getInstance(); cal.add(Calendar.DATE, 7); Date greenDate = cal.getTime(); if (caldroidFragment != null) { ColorDrawable blue = new ColorDrawable(getResources().getColor(R.color.blue)); ColorDrawable green = new ColorDrawable(Color.GREEN); caldroidFragment.setBackgroundDrawableForDate(blue, blueDate); caldroidFragment.setBackgroundDrawableForDate(green, greenDate); caldroidFragment.setTextColorForDate(R.color.white, blueDate); caldroidFragment.setTextColorForDate(R.color.white, greenDate); } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_caldroid); final SimpleDateFormat formatter = new SimpleDateFormat("dd MMM yyyy"); // Setup caldroid fragment // **** If you want normal CaldroidFragment, use below line **** caldroidFragment = new CaldroidFragment(); // ////////////////////////////////////////////////////////////////////// // **** This is to show customized fragment. If you want customized // version, uncomment below line **** // caldroidFragment = new CaldroidSampleCustomFragment(); // Setup arguments // If Activity is created after rotation if (savedInstanceState != null) { caldroidFragment.restoreStatesFromKey(savedInstanceState, "CALDROID_SAVED_STATE"); } // If activity is created from fresh else { Bundle args = new Bundle(); Calendar cal = Calendar.getInstance(); args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1); args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR)); args.putBoolean(CaldroidFragment.ENABLE_SWIPE, true); args.putBoolean(CaldroidFragment.SIX_WEEKS_IN_CALENDAR, true); // Uncomment this to customize startDayOfWeek // args.putInt(CaldroidFragment.START_DAY_OF_WEEK, // CaldroidFragment.TUESDAY); // Tuesday // Uncomment this line to use Caldroid in compact mode // args.putBoolean(CaldroidFragment.SQUARE_TEXT_VIEW_CELL, false); // Uncomment this line to use dark theme // args.putInt(CaldroidFragment.THEME_RESOURCE, com.caldroid.R.style.CaldroidDefaultDark); caldroidFragment.setArguments(args); } setCustomResourceForDates(); // Attach to the activity FragmentTransaction t = getSupportFragmentManager().beginTransaction(); t.replace(R.id.calendar1, caldroidFragment); t.commit(); // Setup listener final CaldroidListener listener = new CaldroidListener() { @Override public void onSelectDate(Date date, View view) { Toast.makeText(getApplicationContext(), formatter.format(date), Toast.LENGTH_SHORT).show(); } @Override public void onChangeMonth(int month, int year) { String text = "month: " + month + " year: " + year; Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show(); } @Override public void onLongClickDate(Date date, View view) { Toast.makeText(getApplicationContext(), "Long click " + formatter.format(date), Toast.LENGTH_SHORT).show(); } @Override public void onCaldroidViewCreated() { if (caldroidFragment.getLeftArrowButton() != null) { Toast.makeText(getApplicationContext(), "Caldroid view is created", Toast.LENGTH_SHORT) .show(); } } }; // Setup Caldroid caldroidFragment.setCaldroidListener(listener); final TextView textView = (TextView) findViewById(R.id.textview); final Button customizeButton = (Button) findViewById(R.id.customize_button); // Customize the calendar assert customizeButton != null; customizeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (undo) { customizeButton.setText(getString(R.string.customize)); textView.setText(""); // Reset calendar caldroidFragment.clearDisableDates(); caldroidFragment.clearSelectedDates(); caldroidFragment.setMinDate(null); caldroidFragment.setMaxDate(null); caldroidFragment.setShowNavigationArrows(true); caldroidFragment.setEnableSwipe(true); caldroidFragment.refreshView(); undo = false; return; } // Else undo = true; customizeButton.setText(getString(R.string.undo)); Calendar cal = Calendar.getInstance(); // Min date is last 7 days cal.add(Calendar.DATE, -7); Date minDate = cal.getTime(); // Max date is next 7 days cal = Calendar.getInstance(); cal.add(Calendar.DATE, 14); Date maxDate = cal.getTime(); // Set selected dates // From Date cal = Calendar.getInstance(); cal.add(Calendar.DATE, 2); Date fromDate = cal.getTime(); // To Date cal = Calendar.getInstance(); cal.add(Calendar.DATE, 3); Date toDate = cal.getTime(); // Set disabled dates ArrayList<Date> disabledDates = new ArrayList<Date>(); for (int i = 5; i < 8; i++) { cal = Calendar.getInstance(); cal.add(Calendar.DATE, i); disabledDates.add(cal.getTime()); } // Customize caldroidFragment.setMinDate(minDate); caldroidFragment.setMaxDate(maxDate); caldroidFragment.setDisableDates(disabledDates); caldroidFragment.setSelectedDates(fromDate, toDate); caldroidFragment.setShowNavigationArrows(false); caldroidFragment.setEnableSwipe(false); caldroidFragment.refreshView(); // Move to date // cal = Calendar.getInstance(); // cal.add(Calendar.MONTH, 12); // caldroidFragment.moveToDate(cal.getTime()); String text = "Today: " + formatter.format(new Date()) + "\n"; text += "Min Date: " + formatter.format(minDate) + "\n"; text += "Max Date: " + formatter.format(maxDate) + "\n"; text += "Select From Date: " + formatter.format(fromDate) + "\n"; text += "Select To Date: " + formatter.format(toDate) + "\n"; for (Date date : disabledDates) { text += "Disabled Date: " + formatter.format(date) + "\n"; } textView.setText(text); } }); Button showDialogButton = (Button) findViewById(R.id.show_dialog_button); final Bundle state = savedInstanceState; assert showDialogButton != null; showDialogButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Setup caldroid to use as dialog dialogCaldroidFragment = new CaldroidFragment(); dialogCaldroidFragment.setCaldroidListener(listener); // If activity is recovered from rotation final String dialogTag = "CALDROID_DIALOG_FRAGMENT"; if (state != null) { dialogCaldroidFragment.restoreDialogStatesFromKey( getSupportFragmentManager(), state, "DIALOG_CALDROID_SAVED_STATE", dialogTag); Bundle args = dialogCaldroidFragment.getArguments(); if (args == null) { args = new Bundle(); dialogCaldroidFragment.setArguments(args); } } else { // Setup arguments Bundle bundle = new Bundle(); // Setup dialogTitle dialogCaldroidFragment.setArguments(bundle); } dialogCaldroidFragment.show(getSupportFragmentManager(), dialogTag); } }); } /** * Save current states of the Caldroid here */ @Override protected void onSaveInstanceState(Bundle outState) { // TODO Auto-generated method stub super.onSaveInstanceState(outState); if (caldroidFragment != null) { caldroidFragment.saveStatesToKey(outState, "CALDROID_SAVED_STATE"); } if (dialogCaldroidFragment != null) { dialogCaldroidFragment.saveStatesToKey(outState, "DIALOG_CALDROID_SAVED_STATE"); } } }


原連接地址:https://github.com/Trinea/android-open-project

Android 開源項目源碼解析(Volley、UIL、Dagger、EventBus、xUtils 等分析)

Android 職位內部推薦(阿里、百度、美團、點評、魅族等)

codeKK專一於開源項目源碼解析、開源項目分享、Android 職位推薦。

咱們的網站:www.codekk.com
咱們的微博:code-kk
微信公衆號:codekk,二維碼以下:

歡迎你們推薦好的Android開源項目,可直接Commit,歡迎StarFork :)

關於我,歡迎關注
微博:Trinea    主頁:trinea.cn    郵箱:trinea.cn#gmail.com    微信:codek2

更多:Android 開源庫獲取途徑整理
分享:                

目前包括:

Android開源項目第一篇——個性化控件(View)篇
  包括ListViewActionBarMenuViewPagerGalleryGridViewImageViewProgressBarTextViewScrollViewTimeViewTipViewFlipViewColorPickViewGraphViewUI Style其餘
Android開源項目第二篇——工具庫篇
  包括依賴注入圖片緩存網絡相關數據庫ORM工具包Android公共庫高版本向低版本兼容庫多媒體事件總線傳感器安全插件化文件其餘
Android開源項目第三篇——優秀項目篇
  比較有意思的完整的Android項目
Android開源項目第四篇——開發及測試工具篇
  包括開發效率工具開發自測相關測試工具開發及編譯環境其餘
Android開源項目第五篇——優秀我的和團體篇
  樂於分享而且有一些很不錯的開源項目的我的組織,包括JakeWharton、Chris Banes、Koushik Dutta等大牛

第一部分 個性化控件(View)

主要介紹那些不錯個性化的View,包括ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar、TextView、ScrollView、TimeView、TipView、FlipView、ColorPickView、GraphView、UI Style等等。

1、ListView

  1. android-pulltorefresh
    一個強大的拉動刷新開源項目,支持各類控件下拉刷新,ListView、ViewPager、WebView、ExpandableListView、GridView、ScrollView、Horizontal ScrollView、Fragment上下左右拉動刷新,比下面johannilsson那個只支持ListView的強大的多。而且它實現的下拉刷新ListView在item不足一屏狀況下也不會顯示刷新提示,體驗更好。
    項目地址:https://github.com/chrisbanes/Android-PullToRefresh
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true
    APP示例:新浪微博各個頁面

  2. android-pulltorefresh-listview
    下拉刷新ListView,這個被不少人使用的項目實際有很多bug,推薦使用上面的android-pulltorefresh
    項目地址:https://github.com/johannilsson/android-pulltorefresh
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refresh-listview-demo.apk?raw=true

  3. android-Ultra-Pull-to-Refresh
    下拉刷新,第一個項目已經中止維護了,而且使用起來相對複雜,定製性也差。這個是替代和改良方案。這個繼承於ViewGroup能夠包含任何View。功能甚至比SwipeRefreshLayout強大。使用起來很是簡單。良好的設計,若是你想定製本身的UI樣式,很是簡單,就像給ListView加一個Header View那麼簡單。支持 API LEVEL >= 8
    項目地址:https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh
    Demo地址:https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh/blob/master/ptr-demo/target/ultra-ptr-demo.apk?raw=true
    效果圖:

       
  4. DropDownListView
    下拉刷新及滑動到底部加載更多ListView
    項目地址:https://github.com/Trinea/AndroidCommon
    Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
    文檔介紹:http://www.trinea.cn/android/dropdown-to-refresh-and-bottom-load-more-listview/

  5. DragSortListView
    拖動排序的ListView,同時支持ListView滑動item刪除,各個Item高度不1、單選、複選、CursorAdapter作爲適配器、拖動背景變化等
    項目地址:https://github.com/bauerca/drag-sort-listview
    Demo地址:https://play.google.com/store/apps/details?id=com.mobeta.android.demodslv
    APP示例:Wordpress Android

  6. SwipeListView
    支持定義ListView左右滑動事件,支持左右滑動位移,支持定義動畫時間
    項目地址:https://github.com/47deg/android-swipelistview
    Demo地址:https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview
    APP示例:微信

  7. Android-SwipeToDismiss
    滑動Item消失ListView,支持3.0如下版本見:https://github.com/JakeWharton/SwipeToDismissNOA
    項目地址:https://github.com/romannurik/Android-SwipeToDismiss
    Demo地址:https://github.com/JakeWharton/SwipeToDismissNOA/SwipeToDismissNOA.apk/qr_code

  8. PinnedHeaderExpandableListView
    首先它是一個ExpandableListView,可是它的頭部能夠固定,其次,在它的上面還有一個頭部能夠來回伸縮
    項目地址:https://github.com/singwhatiwanna/PinnedHeaderExpandableListView
    效果圖:
    APP示例:百度手機衛士垃圾清理界面

  9. StickyListHeaders
    GroupName滑動到頂端時會固定不動直到另一個GroupName到達頂端的ExpandListView,支持快速滑動,支持Android2.3及以上
    項目地址:https://github.com/emilsjolander/StickyListHeaders
    效果圖:
    APP示例:Android 4.0聯繫人

  10. pinned-section-listview
    GroupName滑動到頂端時會固定不動直到另一個GroupName到達頂端的ExpandListView
    項目地址:https://github.com/beworker/pinned-section-listview
    效果圖:

  11. PinnedHeaderListView
    GroupName滑動到頂端時會固定不動直到另一個GroupName到達頂端的ExpandListView
    項目地址:https://github.com/JimiSmith/PinnedHeaderListView

  12. QuickReturn
    ListView/ScrollView的header或footer,當向下滾動時消失,向上滾動時出現
    項目地址:https://github.com/lawloretienne/QuickReturn
    Demo地址:https://play.google.com/store/apps/details?id=com.etiennelawlor.quickreturn

  13. QuickReturnHeader
    ListView/ScrollView的header或footer,當向下滾動時消失,向上滾動時出現
    項目地址:https://github.com/ManuelPeinado/QuickReturnHeader
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/quick-return-header-demo.apk?raw=true
    APP示例:google plus

  14. IndexableListView
    ListView右側會顯示item首字母快捷索引,點擊可快速滑動到某個item
    項目地址:https://github.com/woozzu/IndexableListView
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/indexable-listview.apk?raw=true
    APP示例:微信通信錄、小米聯繫人

  15. CustomFastScrollView
    ListView快速滑動,同時屏幕中間PopupWindows顯示滑動到的item內容或首字母
    項目地址:https://github.com/nolanlawson/CustomFastScrollViewDemo
    效果圖:

  16. Android-ScrollBarPanel
    ListView滑動時固定的Panel指示顯示在scrollbar旁邊
    項目地址:https://github.com/rno/Android-ScrollBarPanel
    效果圖:

  17. SlideExpandableListView
    用戶點擊listView item滑出固定區域,其餘item的區域收縮
    項目地址:https://github.com/tjerkw/Android-SlideExpandableListView
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/slide-expandable-listView-demo.apk?raw=true

  18. JazzyListView
    ListView及GridView item以特殊動畫效果進入屏幕,效果包括grow、cards、curl、wave、flip、fly等等
    項目地址:https://github.com/twotoasters/JazzyListView
    Demo地址:https://play.google.com/store/apps/details?id=com.twotoasters.jazzylistview.sample
    在線演示:http://lab.hakim.se/scroll-effects/

  19. ListViewAnimations
    帶Item顯示動畫的ListView,動畫包括底部飛入、其餘方向斜飛入、下層飛入、漸變消失、滑動刪除等
    項目地址:https://github.com/nhaarman/ListViewAnimations
    Demo地址:https://play.google.com/store/apps/details?id=com.haarman.listviewanimations
    APP示例:Google plus、Google Now卡片式進入、小米系統中應用商店、聯繫人、遊戲中心、音樂、文件管理器的ListView、Ultimate、Light Flow Lite、TreinVerkeer、Running Coach、Pearl Jam Lyrics、Calorie Chart、Car Hire、Super BART、DK FlashCards、Counter Plus、Voorlees Verhaaltjes 2.0

  20. DevsmartLib-Android
    橫向ListView
    項目地址:https://github.com/dinocore1/DevsmartLib-Android
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/horizontal-listview-demo.apk?raw=true

  21. TwoWayView
    橫向ListView的效果,繼承自AdapterView
    項目地址:https://github.com/lucasr/twoway-view

  22. HorizontalVariableListView
    支持Item寬度不一致的ListView
    項目地址:https://github.com/sephiroth74/HorizontalVariableListView

  23. LinearListView
    用LinearLayout實現的ListView,可解決多個ListView並存等問題。目前本身也有須要,等親自嘗試事後會再具體介紹
    項目地址:https://github.com/frankiesardo/LinearListView

  24. MultiChoiceAdapter
    支持多選的ListView Adapter
    項目地址:https://github.com/ManuelPeinado/MultiChoiceAdapter
    Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.multichoiceadapter.demo

  25. EnhancedListView
    支持橫向滑動刪除列表項以及撤銷刪除的ListView,該項目的前身是SwipeToDismissUndoList
    項目地址:https://github.com/timroes/EnhancedListView
    Demo地址:https://play.google.com/store/apps/details?id=de.timroes.android.listviewdemo&rdid=de.timroes.android.listviewdemo

  26. ListBuddies
    自動滾動的雙列ListView ,兩個ListView滾動速度不一致,有視差效果
    項目地址:https://github.com/jpardogo/ListBuddies
    Demo地址:https://play.google.com/store/apps/details?id=com.jpardogo.android.listbuddies
    效果圖:

  27. SwipeMenuListView
    針對ListView item的側滑菜單
    項目地址:https://github.com/baoyongzhang/SwipeMenuListView
    效果圖:
    APP示例:手機QQV5.0

  28. PagingListView
    分頁加載的ListView。當滑動到ListView底部最後一個元素時,顯示一個進度行,而後加載下一頁數據,並顯示。
    項目地址:https://github.com/nicolasjafelle/PagingListView

  29. PullZoomView
    支持下拉時HeaderView縮放的ListView、ScrollView
    項目地址:https://github.com/Frank-Zhu/PullZoomView
    效果圖:

  30. PullToZoomInListView
    滑動ListView時使其HeaderView跟隨滑動縮放
    項目地址:https://github.com/matrixxun/PullToZoomInListView
    效果圖:

  31. CalendarListview
    實現每月一行日曆效果的ListView
    項目地址:https://github.com/traex/CalendarListview
    效果圖:

  32. sticky-headers-recyclerview
    GroupName滑動到頂端時會固定不動直到另一個GroupName到達頂端的ListView,採用support-v7中的RecyclerView實現
    項目地址:https://github.com/timehop/sticky-headers-recyclerview

  33. PullSeparateListView
    到達頂部或底部繼續拉動時,實現Item間的相互分離,兩種模式:(1) 所有分離的模式,即屏幕內全部Item都會分離 (2)部分分離模式,以點擊位置爲分界點,部分item分離
    項目地址:https://github.com/chiemy/PullSeparateListView
    效果圖:

  34. ExpandableLayout
    Header 和 Content Item 均可以展開的 ExpandableListview
    項目地址:https://github.com/traex/ExpandableLayout

  35. PagedHeadListView
    支持paginated header以及material page indicator的ListView.
    項目地址:https://github.com/JorgeCastilloPrz/PagedHeadListView
    效果圖:

  36. CustomSwipeListView
    支持左滑彈出自定義菜單,右滑刪除且容許撤銷,同時能夠自定義滑動動畫時間和滑動觸發事件的時機等。
    項目地址:https://github.com/xyczero/Android-CustomSwipeListView
    效果圖:
    Demo地址:Download here

  37. Pull-to-Refresh.Rentals-Android
    提供一個簡單能夠自定義的下拉刷新實現,Yalantis 出品。
    項目地址:https://github.com/Yalantis/Pull-to-Refresh.Rentals-Android
    效果圖:

  38. ScrollerCalendar
    實現每行顯示一年的12個月份的RecyclerView年曆
    項目地址:https://github.com/guanchao/ScrollerCalendar
    效果圖:

2、ActionBar

  1. ActionBarSherlock
    爲Android全部版本提供統一的ActionBar,解決4.0如下ActionBar的適配問題
    項目地址:https://github.com/JakeWharton/ActionBarSherlock
    Demo地址:https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
    APP示例:太多了。。如今連google都在用

  2. ActionBar-PullToRefresh
    下拉刷新,ActionBar出現加載中提示
    項目地址:https://github.com/chrisbanes/ActionBar-PullToRefresh
    Demo地址:https://play.google.com/store/apps/details?id=uk.co.senab.actionbarpulltorefresh.samples.stock
    APP示例:Gmail,Google plus,知乎等

  3. FadingActionBar
    ListView向下滾動逐漸顯現的ActionBar
    項目地址:https://github.com/ManuelPeinado/FadingActionBar
    Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.fadingactionbar.demo
    APP示例:google music,知乎

  4. NotBoringActionBar
    google music下拉收縮的ActionBar
    項目地址:https://github.com/flavienlaurent/NotBoringActionBar
    Demo地址:http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/
    APP示例:Google音樂

  5. RefreshActionItem
    帶進度顯示和刷新按鈕的ActionBar
    項目地址:https://github.com/ManuelPeinado/RefreshActionItem
    Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.refreshactionitem.demo
    APP示例:The New York Times,DevAppsDirect.

  6. GlassActionBar
    相似玻璃的有必定透明度的ActionBar
    項目地址:https://github.com/ManuelPeinado/GlassActionBar
    Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.glassactionbardemo
    APP示例:google music

3、Menu

  1. MenuDrawer
    滑出式菜單,經過拖動屏幕邊緣滑出菜單,支持屏幕上下左右劃出,支持當前View處於上下層,支持Windows邊緣、ListView邊緣、ViewPager變化劃出菜單等。
    項目地址:https://github.com/SimonVT/android-menudrawer
    Demo地址:http://simonvt.github.io/android-menudrawer/
    APP示例:Gmail、Google Music等大部分google app

  2. SlidingMenu
    滑出式菜單,經過拖動屏幕邊緣滑出菜單,支持屏幕左右劃出,支持菜單zoom、scale、slide up三種動畫樣式出現。與MenuDrawer相比而言,SlidingMenu支持菜單動畫樣式出現,MenuDrawer支持菜單view處於內容的上下層
    項目地址:https://github.com/jfeinstein10/SlidingMenu
    Demo地址:https://play.google.com/store/apps/details?id=com.slidingmenu.example
    APP示例:Foursquare, LinkedIn, Zappos, Rdio, Evernote Food, Plume, VLC for Android, ESPN ScoreCenter, MLS MatchDay, 9GAG, Wunderlist 2, The Verge, MTG Familiar, Mantano Reader, Falcon Pro (BETA), MW3 Barracks

  3. ArcMenu
    支持相似Path的左下角動畫旋轉菜單及橫向劃出菜單、圓心彈出菜單
    項目地址:https://github.com/daCapricorn/ArcMenu
    效果圖:
    https://dl.dropboxusercontent.com/u/11369687/preview1.png
    https://dl.dropboxusercontent.com/u/11369687/raymenu.png
    APP示例:Path

  4. android-satellite-menu
    相似Path的左下角動畫旋轉菜單
    項目地址:https://github.com/siyamed/android-satellite-menu
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/satellite-menu-demo.apk?raw=true
    APP示例:Path

  5. radial-menu-widget
    圓形菜單,支持二級菜單
    項目地址:https://code.google.com/p/radial-menu-widget/
    效果圖:http://farm8.staticflickr.com/7377/11621125154_d1773c2dcc_o.jpg

  6. Android Wheel Menu
    圓形旋轉選取菜單
    項目地址:https://github.com/anupcowkur/Android-Wheel-Menu
    效果圖:

  7. FoldingNavigationDrawer
    滑動並以摺疊方式打開菜單
    項目地址:https://github.com/tibi1712/FoldingNavigationDrawer-Android
    Demo地址:https://play.google.com/store/apps/details?id=com.ptr.folding.sample
    效果圖:

  8. AndroidResideMenu
    仿 Dribbble 的邊欄菜單
    項目地址:https://github.com/SpecialCyCi/AndroidResideMenu
    效果圖:

  9. CircularFloatingActionMenu
    一個可定製的圓形的浮動菜單控件,相似於Path的圓形菜單。這個控件的可定製性更強,能夠很容易的定製菜單出現消失時的動畫,起始角度和半徑。
    項目地址:https://github.com/oguzbilgener/CircularFloatingActionMenu
    Demo地址:https://github.com/oguzbilgener/CircularFloatingActionMenu/tree/master/samples
    效果圖:

  10. NavigationDrawerSI
    Navigation Drawer的一個簡單實現,滑動並以摺疊方式打開菜單
    項目地址:https://github.com/mmBs/NavigationDrawerSI
    Demo地址:https://play.google.com/store/apps/details?id=mmbialas.pl.navigationdrawersi
    效果圖:
    APP示例:https://play.google.com/store/apps/details?id=mmbialas.pl.navigationdrawersi

  11. DragLayout
    使用support.v4包下的ViewDragHelper實現QQ5.0側滑
    項目地址:https://github.com/BlueMor/DragLayout
    效果圖:

  12. LDrawer
    Material Design 形式的展開摺疊Icon
    項目地址:https://github.com/ikimuhendis/LDrawer
    效果圖:

  13. Floating Action Button
    懸浮的圓形菜單欄,支持組建滾動時自動隱藏及其餘設置
    項目地址:https://github.com/shamanland/floating-action-button
    效果圖:

  14. Side-Menu.Android
    分類側滑菜單,Yalantis 出品。
    項目地址:https://github.com/Yalantis/Side-Menu.Android
    效果圖:

  15. Context-Menu.Android
    能夠方便快速集成漂亮帶有動畫效果的上下文菜單,Yalantis出品。
    項目地址:https://github.com/Yalantis/Context-Menu.Android
    效果圖:

4、ViewPager 、Gallery

  1. Android-ViewPagerIndicator
    配合ViewPager使用的Indicator,支持各類位置和樣式
    項目地址:https://github.com/JakeWharton/Android-ViewPagerIndicator
    Demo地址:https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample
    APP示例:太多了。。

  2. JazzyViewPager
    支持Fragment切換動畫的ViewPager,動畫包括轉盤、淡入淡出、翻頁、層疊、旋轉、方塊、翻轉、放大縮小等,效果相似桌面左右切換的各類效果,不過桌面並不是用ViewPager實現而已
    項目地址:https://github.com/jfeinstein10/JazzyViewPager
    Demo地址:https://github.com/jfeinstein10/JazzyViewPager/blob/master/JazzyViewPager.apk?raw=true

  3. JellyViewPager
    特殊切換動畫的ViewPager
    項目地址:https://github.com/chiemy/JellyViewPager
    效果圖:

  4. Android-DirectionalViewPager
    支持橫向和縱向(垂直)的ViewPager
    項目地址:https://github.com/JakeWharton/Android-DirectionalViewPager
    Demo地址:https://market.android.com/details?id=com.directionalviewpager.sample

  5. android-pulltorefresh
    支持下拉刷新的ViewPager
    項目地址:https://github.com/chrisbanes/Android-PullToRefresh
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true
    APP示例:新浪微博各個頁面

  6. FancyCoverFlow
    支持Item切換動畫效果的相似Gallery View
    項目地址:https://github.com/davidschreiber/FancyCoverFlow
    Demo地址:https://play.google.com/store/apps/details?id=at.technikum.mti.fancycoverflow.samples
    效果圖:

  7. AndroidTouchGallery
    支持雙擊或雙指縮放的Gallery(用ViewPager實現),相比下面的PhotoView,在被放大後依然能滑到下一個item,而且支持直接從url和文件中獲取圖片,
    項目地址:https://github.com/Dreddik/AndroidTouchGallery
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/touch-gallery-demo.apk?raw=true
    APP示例:相似微信中查看聊天記錄圖片時可雙擊放大,而且放大狀況下能正常左右滑動到先後圖片

  8. Android Auto Scroll ViewPager
    Android自動滾動 輪播循環的ViewPager
    項目地址:https://github.com/Trinea/android-auto-scroll-view-pager
    Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
    文檔介紹:http://www.trinea.cn/android/auto-scroll-view-pager/

  9. Salvage view
    帶View緩存的Viewpager PagerAdapter,很方便使用
    項目地址:https://github.com/JakeWharton/salvage

  10. Android PagerSlidingTabStrip
    配合ViewPager使用的Indicator,支持ViewPager Scroll時Indicator聯動
    項目地址:https://github.com/astuetz/PagerSlidingTabStrip
    Demo地址:https://play.google.com/store/apps/details?id=com.astuetz.viewpager.extensions.sample

  11. ViewPager3D
    ViewPager3D效果
    項目地址:https://github.com/inovex/ViewPager3D

  12. AnimaTabsview
    仿網易雲音樂標籤切換的動畫,帶透明小三角
    項目地址:https://github.com/wuyexiong/transparent-over-animtabsview
    在線演示:http://v.youku.com/v_show/id_XNzA4MjY5NjA0.html

  13. LoopingViewPager
    無限循環的ViewPager
    項目地址:https://github.com/imbryk/LoopingViewPager

  14. android_page_curl
    翻書卷曲效果
    項目地址:https://github.com/harism/android_page_curl
    APP示例:iReader
    在線演示:https://www.youtube.com/watch?v=iwu7P5PCpsw

  15. ViewPagerIndicator
    簡化並實現android的TabHost效果,頂部滑動tab,引導頁,支持自定義tab樣式,自定義滑動塊樣式和位置,自定義切換tab的過渡動畫,子界面的預加載和界面緩存,設置界面是否可滑動
    項目地址:https://github.com/LuckyJayce/ViewPagerIndicator

  16. ScreenSlideIndicator
    輕量級的圓形 Indicadtor,位置能夠自由調整,不會對 ViewPager 產生任何影響。
    項目地址:ScreenSlidePager
    效果圖:

5、GridView

  1. StaggeredGridView
    容許非對齊行的GridView,相似Pinterest的瀑布流,而且跟ListView同樣自帶View緩存,繼承自ViewGroup
    項目地址:https://github.com/maurycyw/StaggeredGridView
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/staggered-gridview-demo.apk?raw=true
    APP示例:Pinterest等

  2. AndroidStaggeredGrid
    容許非對齊行的GridView,相似Pinterest的瀑布流,繼承自AbsListView
    項目地址:https://github.com/etsy/AndroidStaggeredGrid
    APP示例:Pinterest等

  3. PinterestLikeAdapterView
    容許非對齊行的GridView,相似Pinterest的瀑布流,容許下拉刷新
    項目地址:https://github.com/GDG-Korea/PinterestLikeAdapterView
    APP示例:Pinterest等

  4. DraggableGridView
    Item可拖動交換位置的GridView,實際是本身繼承ViewGroup實現,相似桌面的單屏效果,可屏幕自動上下滾動進行Item移動交換,多屏效果見下面PagedDragDropGrid
    項目地址:https://github.com/thquinn/DraggableGridView
    Demo地址:https://github.com/thquinn/DraggableGridView/blob/master/bin/DraggableGridViewSample.apk?raw=true

  5. StickyGridHeaders
    GroupName滑動到頂端時會固定不動直到另一個GroupName到達頂端的GridView
    項目地址:https://github.com/TonicArtos/StickyGridHeaders
    效果圖:

  6. PagedDragDropGrid
    Item可拖動交換位置、拖動刪除的自定義控件,實際是本身繼承ViewGroup實現,相似桌面的多屏效果,可拖動到屏幕邊緣,屏幕自動左右滾動進行Item移動交換,可拖動進行刪除,單屏效果見上面DraggableGridView
    項目地址:https://github.com/mrKlar/PagedDragDropGrid
    在線演示:http://youtu.be/FYTSRfthSuQ

  7. Android-DraggableGridViewPager
    Item可拖動交換位置的GridView,實際是本身繼承ViewGroup實現,相似桌面的多屏效果,可屏幕自動左右滾動進行Item移動交換,單屏效果見上面DraggableGridView
    項目地址:https://github.com/zzhouj/Android-DraggableGridViewPager
    Demo地址:https://github.com/Trinea/trinea-download/blob/master/draggable-grid-viewpager-demo.apk?raw=true

  8. TwoWayGridView
    可橫向滾動的GridView
    項目地址:https://github.com/jess-anders/two-way-gridview

  9. PagingGridView
    分頁加載的GridView。當滑動到GridView底部最後一個行時,顯示一個進度行,而後加載下一頁數據,並顯示。
    項目地址:https://github.com/nicolasjafelle/PagingGridView

  10. AsymmetricGridView
    一個支持跨行和跨列可變Item大小的GridView
    項目地址:https://github.com/felipecsl/AsymmetricGridView
    Demo地址:https://play.google.com/store/apps/details?id=com.felipecsl.asymmetricgridview.app
    效果圖:

  11. GridView with Header and Footer
    ListView同樣帶頭部和底部的GridView,用法和ListView同樣
    項目地址:https://github.com/liaohuqiu/android-GridViewWithHeaderAndFooter
    效果圖:

6、ImageView

  1. PhotoView
    支持雙擊或雙指縮放的ImageView,在ViewPager等Scrolling view中正常使用,相比上面的AndroidTouchGallery,不只支持ViewPager,同時支持單個ImageView
    項目地址:https://github.com/chrisbanes/PhotoView
    Demo地址:https://play.google.com/store/apps/details?id=uk.co.senab.photoview.sample
    APP示例:photup

  2. android-gif-drawable
    支持gif顯示的view,用jni實現的,編譯生成so庫後直接xml定義view便可,並且自己不依賴於其餘開源項目因此相對下面的ImageViewEx簡單的多
    項目地址:https://github.com/koral--/android-gif-drawable

  3. ImageViewEx
    支持Gif顯示的ImageView,依賴不少,編譯過程很繁瑣
    項目地址:https://github.com/frapontillo/ImageViewEx
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/imageviewex-demo.apk?raw=true

  4. RoundedImageView
    帶圓角的ImageView
    項目地址:https://github.com/vinc3m1/RoundedImageView
    效果圖:

  5. SelectableRoundedImageView
    ImageView容許四個角的每個有不一樣的半徑值。也容許橢圓形、圓形的形狀或者邊
    項目地址:https://github.com/pungrue26/SelectableRoundedImageView
    Demo地址:https://play.google.com/store/apps/details?id=com.joooonho
    效果圖:

  6. ColorArt
    根據圖片的均色設置背景色顯示文字和圖片,相似itune11中效果
    項目地址:https://github.com/MichaelEvans/ColorArt
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/color-art-demo.apk?raw=true

  7. CircleImageView
    圓形的ImageView
    項目地址:https://github.com/hdodenhof/CircleImageView
    效果圖:

  8. ImageViewZoom
    支持放大和平移的ImageView
    項目地址:https://github.com/sephiroth74/ImageViewZoom
    APP示例:https://play.google.com/store/apps/details?id=com.aviary.android.feather

  9. KenBurnsView
    實現Ken Burns effect效果,達到身臨其境效果的ImageView
    項目地址:https://github.com/flavioarfaria/KenBurnsView

  10. CustomShapeImageView
    各類形狀的ImageView, 相比上面的圓形ImageView,多了更多形狀
    項目地址:https://github.com/MostafaGazar/CustomShapeImageView
    效果圖:

  11. Shape Image View
    能夠自定義各類形狀的ImageView, 而且支持邊框
    項目地址:https://github.com/siyamed/android-shape-imageview
    效果圖:

  12. TextDrawable
    一個用於生成帶有文本或者字母的圖片的輕量級庫。擴展自Drawable,所以可用於現有/自定義/網絡等ImageView類,而且包含一個流接口用於建立drawables以及一個定製的ColorGenerator
    項目地址:https://github.com/amulyakhare/TextDrawable
    效果圖:

7、ProgressBar

  1. SmoothProgressBar
    水平進度條
    項目地址:https://github.com/castorflex/SmoothProgressBar
    Demo地址:https://play.google.com/store/apps/details?id=fr.castorflex.android.smoothprogressbar.sample

  2. ProgressWheel
    支持進度顯示的圓形ProgressBar
    項目地址:https://github.com/Todd-Davies/ProgressWheel
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/progress-wheel-demo.apk?raw=true

  3. android-square-progressbar
    在圖片周圍顯示進度
    項目地址:https://github.com/mrwonderman/android-square-progressbar
    Demo地址:https://play.google.com/store/apps/details?id=net.yscs.android.square_progressbar_example
    效果圖:
    APP示例:square

  4. HoloCircularProgressBar
    Android4.1 時鐘App樣式
    項目地址:https://github.com/passsy/android-HoloCircularProgressBar
    效果圖:
    APP示例:Android4.1時鐘App

  5. ProgressButton
    經過圖釘的不一樣狀態顯示進度
    項目地址:https://github.com/f2prateek/progressbutton
    效果圖:
    文檔介紹:http://f2prateek.com/progressbutton/

  6. GoogleProgressBar
    相似google 多個圓形卡片翻轉的progressBar
    項目地址:https://github.com/jpardogo/GoogleProgressBar
    效果圖:

  7. TH-ProgressButton
    帶圓形進度顯示的按鈕
    項目地址;https://github.com/torryharris/TH-ProgressButton
    效果圖: 

  8. NumberProgressBar
    帶數字進度的進度條
    項目地址:https://github.com/daimajia/NumberProgressBar
    效果圖:

  9. CircularProgressDrawable
    帶圓形進度顯示的進度條
    項目地址:https://github.com/Sefford/CircularProgressDrawable
    效果圖:

  10. Android-RoundCornerProgressBar
    Android 圓角 ProgressBar,可自定義圓角顏色和半徑,包括帶 Icon 和不帶 Icon 兩種類型。
    項目地址:https://github.com/akexorcist/Android-RoundCornerProgressBar
    效果圖:

  11. circular-progress-button
    帶進度顯示的Button
    項目地址:https://github.com/dmytrodanylyk/circular-progress-button
    效果圖:

  12. WaveView
    一個波紋效果的 View,可用來作 ProgressBar
    項目地址:https://github.com/john990/WaveView
    Demo地址:https://raw.github.com/john990/WaveView/master/screenshot%26apk/demo.unaligned.apk
    效果圖:

8、TextView

包括TextView及全部繼承自TextView控件,如EditText、Button、RadioButton

  1. android-flowtextview
    文字自動環繞其餘View的Layout
    項目地址:https://github.com/deano2390/FlowTextView
    效果圖:http://i949.photobucket.com/albums/ad332/vostroman1500/1.png

  2. Android Form EditText
    驗證輸入合法性的編輯框,支持輸入、英文、ip、url等多種正則驗證
    項目地址:https://github.com/vekexasia/android-edittext-validator
    Demo地址:https://play.google.com/store/apps/details?id=com.andreabaccega.edittextformexample

  3. Emojicon
    支持emojis的TextView和EditText
    項目地址:https://github.com/rockerhieu/emojicon
    文檔介紹:http://rockerhieu.com/emojicon/

  4. android-circlebutton
    Android圓形按鈕,實際實現是繼承自ImageView
    項目地址:https://github.com/markushi/android-circlebutton
    Demo地址:https://github.com/markushi/android-circlebutton/blob/master/example/example.apk

  5. Segmented Radio Buttons for Android
    iOS’s segmented controls的實現
    項目地址:https://github.com/vinc3m1/android-segmentedradiobutton
    Demo地址:https://github.com/thquinn/DraggableGridView/blob/master/bin/DraggableGridViewSample.apk?raw=true
    效果圖:

  6. Chips EditText Library
    支持國家名字聯想從而選擇顯示該國國旗的EditText,實際就是經過SpannableStringBuilder實現
    項目地址:https://github.com/kpbird/chips-edittext-library
    Demo地址:https://github.com/kpbird/chips-edittext-library/tree/master/ChipsEditTextDemo/bin

  7. AutoFitTextView
    可固定邊界內容字體大小自適應的TextView
    項目地址:https://github.com/grantland/android-autofittextview

  8. Shimmer for Android
    文字發淡光的TextView
    項目地址:https://github.com/RomainPiel/Shimmer-android

  9. Titanic
    能夠顯示水位上升降低(不知道該怎麼描述 囧)的TextView
    項目地址:https://github.com/RomainPiel/Titanic
    效果圖:

  10. android-iconify
    提供帶Icon的TextView,Menu,Button等
    項目地址:https://github.com/JoanZapata/android-iconify

  11. Calligraphy
    讓咱們在android開發中使用自定義字體變得更加簡單
    項目地址 :https://github.com/chrisjenx/Calligraphy
    效果圖:

  12. CreditsRoll
    相似星球大戰字幕效果的TextView
    項目地址:https://github.com/frakbot/CreditsRoll

  13. android-process-buton
    帶加載或提交進度的Button
    項目地址:https://github.com/dmytrodanylyk/android-process-buton

  14. FButton
    扁平化的Button
    項目地址:https://github.com/hoang8f/android-flat-button
    Demo地址:https://play.google.com/store/apps/details?id=info.hoang8f.fbutton.demo

  15. FloatingActionButton
    一個相似Android版Google+浮動功能按鈕的控件,能夠響應ListView的滾動事件。當列表向上滾動的時候會自動顯示,向下滾動的時候自動隱藏。
    項目地址:https://github.com/makovkastar/FloatingActionButton
    Demo地址:https://github.com/makovkastar/FloatingActionButton/tree/master/
    效果圖:

  16. Android Saripaar
    Android表單驗證
    項目地址:https://github.com/ragunathjawahar/android-saripaar/

  17. JumpingBeans
    文字像 Mexican beans 同樣跳動
    項目地址:https://github.com/frakbot/JumpingBeans
    Demo地址:http://play.google.com/store/apps/details?id=net.frakbot.jumpingbeans.demo
    效果圖:

  18. FancyButtons
    一個不用圖片就能夠幫助咱們建立出漂亮按鈕的庫。
    項目地址:https://github.com/medyo/fancybuttons
    Demo地址:https://github.com/medyo/fancybuttons/tree/master/samples
    效果圖: 

  19. Android-RobotoTextView
    一個實現了全部Roboto字體的TextView,包括新出的Roboto Slab字體。
    項目地址:https://github.com/johnkil/Android-RobotoTextView
    Demo地址:http://play.google.com/store/apps/details?id=com.devspark.robototextview
    Demo項目:https://github.com/johnkil/Android-RobotoTextView/tree/master/robototextview-sample
    效果圖:>

  20. Android-WizardPager
    一個表單嚮導庫
    項目地址:https://github.com/romannurik/android-wizardpager
    Demo項目:https://github.com/str4d/android-wizardpager/tree/textfield
    效果圖:

  21. RippleView
    一個實現了 Android L 上才引入的點擊按鈕後出現水波紋效果的按鈕
    項目地址:https://github.com/siriscac/RippleView
    Demo項目:https://github.com/siriscac/RippleView/tree/master/RippleViewExample
    效果圖:

  22. RippleEffect
    一個實現Material Design Ripple效果的庫,支持Android API 9+以上版本。
    項目地址:https://github.com/traex/RippleEffect
    Demo項目:https://github.com/traex/RippleEffect/tree/master/sample
    效果圖:

  23. Android Floating Label Widgets
    包含一系列控件,這些控件特色是:有默認值,當值不爲空時默認值浮動到上面變爲提示
    項目地址:https://github.com/marvinlabs/android-floatinglabel-widgets
    Demo地址:https://play.google.com/store/apps/details?id=com.marvinlabs.widget.floatinglabel.demo
    在線演示:http://www.youtube.com/watch?v=hpZD9gJcRg0&feature=youtu.be

  24. MaterialEditText
    EditText 的 Material Design 實現。包含 Google Material Design Spec中的UI效果和一些新增特性。
    項目地址:https://github.com/rengwuxian/MaterialEditText

  25. MultiActionTextView
    能夠分別給TextView中的某幾個字設置點擊事件的TextView
    項目地址:https://github.com/ajaysahani/MultiActionTextView
    效果圖:

  26. ToggleButton
    狀態切換的 Button,相似 iOS,用 View 實現
    項目地址:https://github.com/zcweng/ToggleButton
    效果圖:

  27. SlideSwitch
    狀態切換的開關,能夠設置爲相似IOS的圓形,也能夠設置爲矩形,用 View 實現
    項目地址:https://github.com/Leaking/SlideSwitch
    效果圖:

  28. ExpandableTextView
    可展開和收縮內容的TextView。
    項目地址:https://github.com/Manabu-GT/ExpandableTextView
    效果圖:

9、ScrollView

  1. Discrollview
    支持滾動時Item淡入淡出,平移,縮放效果的ScrollView
    項目地址:https://github.com/flavienlaurent/discrollview
    Demo地址:https://github.com/flavienlaurent/discrollview/raw/master/sample.apk

  2. PullScrollView
    仿照新浪微博Android客戶端我的中心的ScrollView,下拉背景伸縮回彈效果。
    項目地址:https://github.com/MarkMjw/PullScrollView
    效果圖:

  3. ParallaxScrollView
    支持視差滾動的ScrollView ,背景圖片的滾動速度小於ScrollView中子控件的滾動速度
    項目地址:https://github.com/chrisjenx/ParallaxScrollView
    Demo地址:http://cloud.github.com/downloads/chrisjenx/ParallaxScrollView/ParallaxScrollViewDemo-v1.0.5.apk

  4. AKParallax-Android
    支持視差滾動的ScrollView
    項目地址:https://github.com/ideaismobile/AKParallax-Android
    Demo地址:https://play.google.com/store/apps/details?id=com.appkraft.parallax_sample

  5. Android-ObservableScrollView
    監聽滾動視圖滾動事件的庫,幫助與Toolbar的交互動效處理與Material Design的實現
    項目地址:https://github.com/ksoichiro/Android-ObservableScrollView
    Demo地址:https://play.google.com/store/apps/details?id=com.github.ksoichiro.android.observablescrollview.samples2

  6. OverScrollView
    有彈性的ScrollView,實現了當手指滑動到ScrollView的頂部、底部時,能夠繼續的向上、向下拉伸。當釋放手指的時候,向上、下回彈
    項目地址:https://github.com/EverythingMe/OverScrollView

10、TimeView

包括TimePicker、DatePicker、CalendarView、Clock等時間相關控件

  1. android-times-square
    Android日曆時間部件,支持選取單個日期,多個日期,及日期區間段和對話框形式顯示
    項目地址:https://github.com/square/android-times-square
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/times-square-demo.apk?raw=true

  2. android-calendar-card
    日曆
    項目地址:https://github.com/kenumir/android-calendar-card
    Demo地址:https://play.google.com/store/apps/details?id=com.wt.calendarcardsample
    效果圖:

  3. AndroidWheel
    Android Wheel支持城市、多種日期時間、密碼、圖片
    項目地址:https://code.google.com/p/android-wheel/
    效果圖:

  4. GoogleDateTimePickers
    時間選擇部件
    項目地址:https://github.com/Mirkoddd/GoogleDateTimePickers
    文檔介紹:https://play.google.com/store/apps/details?id=com.mirko.sample&hl=it

  5. DateTimePicker
    日期選擇部件(Google Agenda的樣式風格)
    項目地址:https://github.com/flavienlaurent/datetimepicker
    Demo地址:https://raw.github.com/biboune/datetimepicker/master/datetimepicker-sample.apk
    效果圖:

  6. android-betterpickers
    提供日期、數字、時間(數字方式和鐘錶方式)、重複週期(鬧鐘的週期重複)、HMS(時、分、秒)的選擇,支持以DialogFragment的彈窗選擇
    項目地址:https://github.com/derekbrameyer/android-betterpickers
    Demo地址:https://play.google.com/store/apps/details?id=com.doomonafireball.betterpickers.sample 效果圖:

  7. Android Week View
    日期控件,支持周,天視圖,支持自定義樣式
    項目地址:https://github.com/alamkanak/Android-Week-View
    效果圖:

11、TipView

包括Toast、角標、UndoBar等提示性控件

  1. Crouton
    豐富樣式的Toast,容許alert、comfirm、info樣式及點擊消失樣式,容許設置Toast顯示時間,容許自定義View。 本文32. SuperToasts爲其擴展版
    項目地址:https://github.com/keyboardsurfer/Crouton
    Demo地址:http://play.google.com/store/apps/details?id=de.keyboardsurfer.app.demo.crouton

  2. supertooltips
    帶動畫效果的Tips顯示
    項目地址:https://github.com/nhaarman/supertooltips
    Demo地址:https://play.google.com/store/apps/details?id=com.haarman.supertooltips

  3. Android ViewBadger
    爲其餘View添加角標等
    項目地址:https://github.com/jgilfelt/android-viewbadger
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/android-viewbadger.apk?raw=true
    效果圖:

  4. SuperToasts
    更豐富樣式的toast,支持Button、Progress、Horizontal Progress樣式、支持進入動畫、支持撤銷及其動畫設置
    項目地址:https://github.com/JohnPersano/SuperToasts
    Demo地址:https://play.google.com/store/apps/details?id=com.supertoastsdemo
    效果圖:

  5. UndoBar
    屏幕底部顯示取消或是確認的PopupWindows
    項目地址:https://github.com/soarcn/UndoBar
    效果圖:

  6. UndoBar
    屏幕底部顯示取消或是確認某操做
    項目地址:https://github.com/jenzz/Android-UndoBar
    效果圖:

  7. Android-ActionItemBadge
    能夠在ActionBar的MenuItem上顯示一個小角標
    項目地址:https://github.com/mikepenz/Android-ActionItemBadge
    效果圖:

  8. SnackBar
    Material Design 風格的 Toast,相似 Google inbox 中的提示
    項目地址:https://github.com/MrEngineer13/SnackBar
    Demo地址:https://play.google.com/store/apps/details?id=com.mrengineer13.snackbar.sample
    效果圖:

  9. HeadsUp
    在2.3上使用 android 5.0的 HeadsUp 效果
    項目地址:https://github.com/zzz40500/HeadsUp
    效果圖:

12、FlipView

  1. android-flip
    相似Flipboard翻轉動畫的實現
    項目地址:https://github.com/openaphid/android-flip
    Demo地址:https://github.com/openaphid/android-flip/blob/master/FlipView/Demo/APK/Aphid-FlipView-Demo.apk?raw=true
    APP示例:flipboard

  2. FlipImageView
    支持x、y、z及動畫選擇的翻轉動畫的實現
    項目地址:https://github.com/castorflex/FlipImageView
    Demo地址:https://play.google.com/store/apps/details?id=fr.castorflex.android.flipimageview

  3. FoldableLayout
    Flip翻轉效果的ListView,目前還不支持ListView緩存
    項目地址:https://github.com/alexvasilkov/FoldableLayout
    Demo地址:http://play.google.com/store/apps/details?id=com.alexvasilkov.foldablelayout.sample

十3、ColorPickView

  1. ColorPickerView
    顏色選擇器,支持PopupWindows或新的Activity中打開
    項目地址:https://code.google.com/p/color-picker-view/
    效果圖:

  2. HoloColorPicker
    顏色選擇器
    項目地址:https://github.com/LarsWerkman/HoloColorPicker
    Demo地址:https://docs.google.com/file/d/0BwclyDTlLrdXRzVnTGJvTlRfU2s/edit

  3. ColorPickerPreference
    顏色選擇器
    項目地址:https://github.com/attenzione/android-ColorPickerPreference
    效果圖:

  4. ColorPicker
    顏色選擇器(Google Agenda中的樣式風格)
    項目地址:https://github.com/flavienlaurent/colorpicker
    Demo地址:https://raw.github.com/biboune/colorpicker/master/colorpicker-sample.apk
    效果圖:

十4、GraphView

  1. MPAndroidChart
    強大的圖表繪製工具,支持折線圖、面積圖、散點圖、時間圖、柱狀圖、條圖、餅圖、氣泡圖、圓環圖、範圍(高至低)條形圖、網狀圖及各類圖的結合;支持圖的拖拽縮放;支持 Android 2.2 以上,支持橫縱軸縮放,多指縮放,展示動畫、高亮、保存到 sdcard、從文件讀取圖表
    項目地址:https://github.com/PhilJay/MPAndroidChart
    Demo地址:https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample
    Demo項目:https://github.com/PhilJay/MPAndroidChart/tree/master/MPChartExample
    效果圖:





    在線演示:https://www.youtube.com/watch?v=ufaK_Hd6BpI

  2. achartengine
    強大的圖表繪製工具,支持折線圖、面積圖、散點圖、時間圖、柱狀圖、條圖、餅圖、氣泡圖、圓環圖、範圍(高至低)條形圖、撥號圖/表、立方線圖及各類圖的結合
    項目地址:https://code.google.com/p/achartengine/
    效果圖:
    http://www.achartengine.org/dimages/sales_line_and_area_chart.png
    http://www.achartengine.org/dimages/temperature_range_chart.png
    http://www.achartengine.org/dimages/combined_chart.png
    http://www.achartengine.org/dimages/budget_chart.png
    官網網址:http://www.achartengine.org/
    APP示例:Wordpress Android,Google Analytics

  3. GraphView
    繪製圖表和曲線圖的View,可用於Android上的曲形圖、柱狀圖、波浪圖展現
    項目地址:https://github.com/jjoe64/GraphView
    Demo項目:https://github.com/jjoe64/GraphView-Demos
    APP示例:Wordpress Android,Google Analytics

  4. HoloGraphLibrary
    繪製現狀圖、柱狀圖、餅狀圖
    項目地址:https://bitbucket.org/danielnadeau/holographlibrary/src
    文檔介紹:https://bitbucket.org/danielnadeau/holographlibrary/wiki/Home

  5. XCL-Charts
    XCL-Charts基於原生的Canvas來繪製各類圖表,在設計時,儘可能在保證開發效率的同時,給使用者提供足夠多的定製化能力。所以使用簡便,同時具備至關靈活的定製能力。目前支持3D/非3D柱形圖(Bar Chart)、3D/非3D餅圖(Pie Chart)、堆積圖(Stacked Bar Chart)、面積圖(Area Chart)、 折線圖(Line Chart)、曲線圖(Spline Chart)、環形圖(Dount Chart)、南丁格爾玫瑰圖(Rose Chart)、儀表盤(Dial Chart)、刻度盤(Gauge Chart)、雷達圖(Radar Chart)、圓形圖(Circle Chart)等圖表。其它特性還包括支持圖表縮放、手勢移動、動畫顯示效果、高密度柱形顯示、圖表分界定製線、多圖表的混合顯示及同數據源不一樣類型圖表切換等。
    項目地址:https://github.com/xcltapestry/XCL-Charts
    Demo地址:https://github.com/xcltapestry/XCL-Charts/blob/master/XCL-Charts-demo/bin/XCL-Charts-demo.apk?raw=true

  6. EazeGraph
    Android 圖表庫,支持柱狀圖、分層柱狀圖、餅狀圖、線性圖
    項目地址:https://github.com/blackfizz/EazeGraph
    Demo地址:https://play.google.com/store/apps/details?id=org.eazegraph.app

  7. WilliamChart
    繪製圖表的庫,支持LineChartView、BarChartView和StackBarChartView三中圖表類型,而且支持 Android 2.2及以上的系統。
    項目地址:https://github.com/diogobernardino/WilliamChart
    Demo地址:https://play.google.com/store/apps/details?id=com.db.williamchartdemo
    Demo項目:https://github.com/diogobernardino/WilliamChart/tree/master/sample
    效果圖:

  8. HelloCharts for Android
    支持折線圖、柱狀圖、餅圖、氣泡圖、組合圖;支持預覽、放大縮小,滾動,部分圖表支持動畫;支持 Android 2.2 以上
    項目地址:https://github.com/lecho/hellocharts-android
    Demo地址:https://play.google.com/store/apps/details?id=lecho.lib.hellocharts.samples
    在線演示:https://www.youtube.com/watch?v=xbSBjyjH2SY

十5、UI Style

不一樣樣式的系統UI風格,如IOS、Bootstrap風格

  1. UITableView
    ios風格控件,包括Button、ListView、TableView
    項目地址:https://github.com/thiagolocatelli/android-uitableview
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/ui-tableview-demo.apk?raw=true

  2. ATableView
    ios風格控件
    項目地址:https://github.com/dmacosta/ATableView
    Demo地址:https://play.google.com/store/apps/details?id=com.nakardo.atableview.demo

  3. Cards-UI
    卡片式View,支持單個卡片,item爲卡片的ListView
    項目地址:https://github.com/afollestad/Cards-UI
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/cards-ui-demo.apk?raw=true

  4. cardslib
    卡片式View,支持單個卡片,item爲卡片的ListView和GridView
    項目地址:https://github.com/gabrielemariotti/cardslib
    Demo地址:https://play.google.com/store/apps/details?id=it.gmariotti.cardslib.demo

  5. Android-Bootstrap
    Bootstrap 風格的按鈕
    項目地址:https://github.com/Bearded-Hen/Android-Bootstrap
    效果圖:

  6. Material Design Android Library
    Android L 中 Material Design 風格的組件適配到 Android 2.2+
    項目地址:https://github.com/navasmdc/MaterialDesignLibrary

  7. Android FlatUI
    Android 扁平化風格的組件,支持一些自定義樣式
    項目地址:https://github.com/eluleci/FlatUI
    效果圖:

十6、其餘

  1. SwipeBackLayout
    左右或向上滑動返回的Activity
    項目地址:https://github.com/Issacw0ng/SwipeBackLayout
    Demo地址:https://play.google.com/store/apps/details?id=me.imid.swipebacklayout.demo
    APP示例:知乎

  2. android-styled-dialogs
    可自定義樣式的dialog,默認與Holo主題樣式一致,在Android2.2以上同同樣式
    項目地址:https://github.com/inmite/android-styled-dialogs
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/styled-dialogs-demo.apk?raw=true

  3. Android Sliding Up Panel
    可拖動的View,能在當前Activity上扶起一個可拖動的Panel
    項目地址:https://github.com/umano/AndroidSlidingUpPanel
    Demo地址:https://play.google.com/store/apps/details?id=com.sothree.umano
    APP示例:Google Music精簡播放欄

  4. AndroidWheel
    Android Wheel支持城市、多種日期時間、密碼、圖片
    項目地址:https://code.google.com/p/android-wheel/
    效果圖:

  5. TableFixHeaders
    第一列固定的Table
    項目地址:https://github.com/InQBarna/TableFixHeaders
    Demo地址:http://bit.ly/13buAIq

  6. Inscription
    可用於展現應用change和new feature信息
    項目地址:https://github.com/MartinvanZ/Inscription

  7. ActivityTransition
    Activity切換動畫,包括漸變、flip、某個位置進入等等
    項目地址:https://github.com/ophilbert/ActivityTransition
    效果圖:相似桌面左右切換的各類效果,不過桌面並不是用ViewPager實現而已
    文檔介紹:https://github.com/jfeinstein10/JazzyViewPager/blob/master/JazzyViewPager.apk?raw=true

  8. EasyAndroidAnimations
    針對View的各類動畫
    項目地址:https://github.com/2359media/EasyAndroidAnimations

  9. GlowPadBackport
    將Android4.2的鎖屏界面解鎖擴展到Android1.6及1.6+
    項目地址:https://github.com/rock3r/GlowPadBackport
    Demo地址:https://play.google.com/store/apps/details?id=net.sebastianopoggi.samples.ui.GlowPadSample
    效果圖:

  10. GlowPadView
    Android4鎖屏界面解鎖
    項目地址:https://github.com/nadavfima/GlowPadView
    效果圖:https://raw.github.com/nadavfima/GlowPadView/master/example.png

  11. android-lockpattern
    Android的圖案密碼解鎖
    項目地址:https://code.google.com/p/android-lockpattern/
    Demo地址:https://play.google.com/store/apps/details?id=group.pals.android.lib.ui.lockpattern.demo
    文檔介紹:https://code.google.com/p/android-lockpattern/wiki/QuickUse
    APP示例:Android開機的圖案密碼解鎖,支付寶的密碼解鎖

  12. PatternLock
    另外一個 Android 圖案解鎖庫
    項目地址:https://github.com/DreaminginCodeZH/PatternLock
    Demo 地址:https://github.com/DreaminginCodeZH/PatternLock/raw/master/dist/sample.apk
    效果圖:
    APP示例:Android開機的圖案密碼解鎖,支付寶的密碼解鎖

  13. RangeBar
    相似於SeekBar,不一樣的是能夠選擇一個範圍內的值而不是單個值
    項目地址:https://github.com/edmodo/range-bar
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/range-bar-demo.apk?raw=true
    效果圖:

  14. ChromeView
    利用Chromium實現的WebView,解決各個Android版本WebView不一樣的問題,同時利用最新Chrome代碼
    項目地址:https://github.com/pwnall/chromeview

  15. android-phased-seek-bar
    支持預先定義狀態的SeekBar
    項目地址:https://github.com/ademar111190/android-phased-seek-bar
    效果圖:

  16. Android Slider Preference Library
    可添加到設置中的基於對話框的RankBar小部件
    項目地址:https://github.com/jayschwa/AndroidSliderPreference

  17. ShowcaseView library
    用於高亮顯示應用程序的特定部分,從而突出突出重點
    項目地址:https://github.com/amlcurran/ShowcaseView

  18. android-segmented-control
    Android上的Segmented Controls,至關於RadioButton組
    項目地址:https://github.com/hoang8f/android-segmented-control

  19. Swipeable Cards
    相似Tinder的卡片效果,能夠加載圖片並動畫效果展現,向左滑動表示喜歡,向右表示不喜歡
    項目地址:https://github.com/kikoso/Swipeable-Cards
    Demo地址:https://play.google.com/store/apps/details?id=info.hoang8f.fbutton.demo

  20. EdgeEffectOverride
    改變ScrollView, ListView, ExpandableListView, GridView, ViewPager等滾動控件滾動到邊緣的顏色效果
    項目地址:https://github.com/AndroidAlliance/EdgeEffectOverride

  21. android-pinned-header-listviews
    使ExpandListView的Group滑動到頂端時會固定不動直到另一個Group到達頂端
    項目地址:https://github.com/rtyley/android-pinned-header-listviews

  22. AndroidSwipeLayout
    滑動Layout,支持單個View,ListView,GridView
    項目地址:https://github.com/daimajia/AndroidSwipeLayout
    Demo地址:Download Demo
    效果圖:

  23. DynamicCardLayout
    在Android中實現的相似Windows8的瓷片佈局
    項目地址:https://github.com/dodola/DynamicCardLayout
    效果圖:

  24. Emoticons-Keyboard
    帶表情情符號的自定義鍵盤
    項目地址:https://github.com/chiragjain/Emoticons-Keyboard
    效果圖:

  25. Android Typeface Helper
    能夠幫你輕鬆實現自定義字體的庫
    項目地址:https://github.com/norbsoft/android-typeface-helper
    效果圖:

  26. Android-Anim-Playground
    幾個動畫效果,其中第二個基於android-svg的繪製效果很是好
    項目地址:https://github.com/Tibolte/Android-Anim-Playground
    效果圖:

  27. NiftyDialogEffects
    支持自定義飛入動畫樣式的 Dialog
    項目地址:https://github.com/sd6352051/NiftyDialogEffects
    效果圖:
    在線演示:http://tympanus.net/Development/ModalWindowEffects/

  28. PostOffice
    建立 Holo 及 Material Design 樣式的 Dialog
    項目地址:https://github.com/r0adkll/PostOffice
    效果圖:

  29. Swipecards
    相似Tinder的卡片效果,能夠加載圖片並動畫效果展現,向左滑動表示喜歡,向右表示不喜歡,根據 Kikoso's Swipeable-Cards 改造而來
    項目地址:https://github.com/Diolor/Swipecards

  30. SeekArc
    圓形的 SeekBar
    項目地址:https://github.com/TriggerTrap/SeekArc
    效果圖:

  31. BlurDialogFragment
    顯示 DialogFragment 時背景模糊效果
    項目地址:https://github.com/tvbarthel/BlurDialogFragment
    Demo地址:https://play.google.com/store/apps/details?id=fr.tvbarthel.lib.blurdialogfragment.sample

  32. range-seek-bar
    隨機值選取的 SeekBar
    項目地址:https://github.com/yahoo/android-range-seek-bar
    效果圖:

  33. MaterialRangeBar
    能夠選擇一個範圍內的值而不是單個值的 SeekBar,RangeBar 的 Material Design 風格適配
    項目地址:https://github.com/oli107/material-range-bar
    效果圖:

  34. MaterialList
    Material Design 風格的 CardView
    項目地址:https://github.com/dexafree/MaterialList
    Demo地址:https://play.google.com/store/apps/details?id=com.dexafree.materiallistviewexample
    效果圖:

  35. road-trip
    設置path的各類動畫效果,以及如何實現複雜路徑動畫,相似於ios中的指紋註冊界面的指紋動畫效果
    項目地址:https://github.com/romainguy/road-trip
    效果圖:

  36. dialogplus
    一個簡單的Android對話框,支持不一樣的彈出模式
    項目地址:https://github.com/orhanobut/dialogplus
    效果圖:

  37. FlowLayout
    一個簡單的流式佈局,用法相似 LinearLayout,可是可以讓子元素根據寬度自動換行
    項目地址:FLowLayout
    效果圖:

第二部分 工具庫

主要包括那些不錯的開發庫,包括依賴注入框架、圖片緩存、網絡相關、數據庫ORM建模、Android公共庫、Android 高版本向低版本兼容、多媒體相關及其餘。

1、依賴注入DI

經過依賴注入減小View、服務、資源簡化初始化,事件綁定等重複繁瑣工做

  1. AndroidAnnotations(Code Diet)
    android快速開發框架
    項目地址:https://github.com/excilys/androidannotations
    文檔介紹:https://github.com/excilys/androidannotations/wiki
    官網網址:http://androidannotations.org/
    特色:(1) 依賴注入:包括view,extras,系統服務,資源等等
    (2) 簡單的線程模型,經過annotation表示方法運行在ui線程仍是後臺線程
    (3) 事件綁定:經過annotation表示view的響應事件,不用在寫內部類
    (4) REST客戶端:定義客戶端接口,自動生成REST請求的實現
    (5) 沒有你想象的複雜:AndroidAnnotations只是在在編譯時生成相應子類
    (6) 不影響應用性能:僅50kb,在編譯時完成,不會對運行時有性能影響。
    PS:與roboguice的比較:roboguice經過運行時讀取annotations進行反射,因此可能影響應用性能,而AndroidAnnotations在編譯時生成子類,因此對性能沒有影響

  2. roboguice
    幫你處理了不少代碼異常,利用annotation使得更少的代碼完成項目
    項目地址:https://github.com/roboguice/roboguice
    文檔介紹:https://github.com/roboguice/roboguice/wiki

  3. butterknife
    利用annotation幫你快速完成View的初始化,減小代碼
    項目地址:https://github.com/JakeWharton/butterknife
    文檔介紹:http://jakewharton.github.io/butterknife/

  4. Dagger
    依賴注入,適用於Android和Java
    項目地址:https://github.com/square/dagger
    文檔介紹:http://square.github.io/dagger/

2、圖片緩存

  1. Android-Universal-Image-Loader
    圖片緩存,目前使用最普遍的圖片緩存,支持主流圖片緩存的絕大多數特性。
    項目地址:https://github.com/nostra13/Android-Universal-Image-Loader
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/universal-imageloader-demo.apk?raw=true
    文檔介紹:http://www.intexsoft.com/blog/item/74-universal-image-loader-part-3.html

  2. picasso
    square開源的圖片緩存
    項目地址:https://github.com/square/picasso
    文檔介紹:http://square.github.io/picasso/
    特色:(1)能夠自動檢測adapter的重用並取消以前的下載
    (2)圖片變換
    (3)能夠加載本地資源
    (4)能夠設置佔位資源
    (5)支持debug模式

  3. ImageCache
    圖片緩存,包含內存和Sdcard緩存
    項目地址:https://github.com/Trinea/AndroidCommon
    Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
    文檔介紹:http://www.trinea.cn/android/android-imagecache/
    特色:(1)支持預取新圖片,支持等待隊列
    (2)包含二級緩存,可自定義文件名保存規則
    (3)可選擇多種緩存算法(FIFO、LIFO、LRU、MRU、LFU、MFU等13種)或自定義緩存算法
    (4)可方便的保存及初始化恢復數據
    (5)支持不一樣類型網絡處理
    (6)可根據系統配置初始化緩存等

  4. Cube ImageLoader
    阿里巴巴一淘使用的圖片加載,綜合了Android-Universal-Image-Loader 和 square 等組件優勢,簡單易用,良好的中文文檔支持
    項目地址:https://github.com/etao-open-source/cube-sdk
    Demo地址:https://github.com/liaohuqiu/cube-sdk/raw/master/cube-sdk-sample.apk
    效果圖:文檔介紹:http://cube-sdk.liaohuqiu.net/

  5. fresco
    一款強大的圖片緩存工具,由 Facebook開發
    項目地址:https://github.com/facebook/fresco
    文檔介紹:http://frescolib.org/
    特色:(1) 兩個內存緩存加上磁盤緩存構成了三級緩存
    (2) 支持流式,能夠相似網頁上模糊漸進式顯示圖片
    (3) 對多幀動畫圖片支持更好,如 Gif、WebP
    (4) 更多樣的顯示,如圓角、進度條、點擊重試、自定義對焦點
    (5) 更多樣的加載,如支持 EXIF、全面支持 WebP
    (6) 支持 Android 2.3+

3、網絡相關

  1. Asynchronous Http Client for Android
    Android異步Http請求
    項目地址:https://github.com/loopj/android-async-http
    文檔介紹:http://loopj.com/android-async-http/
    特色:(1) 在匿名回調中處理請求結果
    (2) 在UI線程外進行http請求
    (3) 文件斷點上傳
    (4) 智能重試
    (5) 默認gzip壓縮
    (6) 支持解析成Json格式
    (7) 可將Cookies持久化到SharedPreferences

  2. android-query
    異步加載,更少代碼完成Android加載
    項目地址:https://github.com/androidquery/androidquery 或 https://code.google.com/p/android-query/
    Demo地址:https://play.google.com/store/apps/details?id=com.androidquery
    文檔介紹:https://code.google.com/p/android-query/#Why_AQuery?
    特色:https://code.google.com/p/android-query/#Why_AQuery?

  3. Async Http Client
    Java異步Http請求
    項目地址:https://github.com/AsyncHttpClient/async-http-client
    文檔介紹:http://sonatype.github.io/async-http-client/

  4. Ion
    支持圖片、json、http post等異步請求
    項目地址:https://github.com/koush/ion
    文檔介紹:https://github.com/koush/ion#more-examples

  5. HttpCache
    Http緩存
    項目地址:https://github.com/Trinea/AndroidCommon
    Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
    文檔介紹:http://www.trinea.cn/android/android-http-cache
    特色是:(1) 根據cache-control、expires緩存http請求
    (2) 支持同步、異步Http請求
    (3) 在匿名回調中處理請求結果
    (4) 在UI線程外進行http請求
    (5) 默認gzip壓縮

  6. Http Request
    項目地址:https://github.com/kevinsawicki/http-request
    文檔介紹:https://github.com/kevinsawicki/http-request#examples

  7. okhttp
    square開源的http工具類
    項目地址:https://github.com/square/okhttp
    文檔介紹:http://square.github.io/okhttp/
    特色:(1) 支持SPDY( http://zh.wikipedia.org/wiki/SPDY )協議。SPDY協議是Google開發的基於傳輸控制協議的應用層協議,經過壓縮,多路複用(一個TCP連接傳送網頁和圖片等資源)和優先級來縮短加載時間。
    (2) 若是SPDY不可用,利用鏈接池減小請求延遲
    (3) Gzip壓縮
    (4) Response緩存減小沒必要要的請求

  8. Retrofit
    RESTFUL API設計
    項目地址:https://github.com/square/retrofit
    文檔介紹:http://square.github.io/retrofit/

  9. RoboSpice
    Android異步網絡請求工具,支持緩存、REST等等
    項目地址:https://github.com/stephanenicolas/robospice
    Demo地址:https://github.com/stephanenicolas/RoboDemo/downloads

  10. Droppy
    支持多種樣式的下拉菜單
    項目地址:https://github.com/shehabic/Droppy

4、數據庫 orm工具包

orm的db工具類,簡化建表、查詢、更新、插入、事務、索引的操做

  1. greenDAO
    Android Sqlite orm的db工具類
    項目地址:https://github.com/greenrobot/greenDAO
    文檔介紹:http://greendao-orm.com/documentation/
    官網網址:http://greendao-orm.com/
    特色:(1) 性能佳
    (2) 簡單易用的API
    (3) 內存小好小
    (4) 庫大小小

  2. ActiveAndroid
    Android Sqlite orm的db工具類
    項目地址:https://github.com/pardom/ActiveAndroid
    文檔介紹:https://github.com/pardom/ActiveAndroid/wiki/_pages

  3. Sprinkles
    Android Sqlite orm的db工具類,比較顯著的特色就是配合 https://github.com/square/retrofit 能保存從服務器獲取的數據
    項目地址:https://github.com/emilsjolander/sprinkles
    文檔介紹:http://emilsjolander.github.io/blog/2013/12/18/android-with-sprinkles/

  4. Realm
    移動端的數據庫,適用於 Phone、Tablet、Wearable,支持 ORM,線程安全、支持連表及數據庫加密,比 SQLite 性能更好
    項目地址:https://github.com/realm/realm-java
    文檔介紹:http://realm.io/docs/java/0.72.0/

  5. ormlite-android
    項目地址:https://github.com/j256/ormlite-android
    文檔介紹:http://ormlite.com/sqlite_java_android_orm.shtml

  6. Schematic
    根據SQLite生成ContentProvider
    項目地址:https://github.com/SimonVT/schematic

  7. DBFlow
    Android SQLite ORM工具庫。綜合了 Active Android, Schematic, Ollie,Sprinkles等庫的優勢;經過註解實現,性能好;能生成ContentProvider。
    項目地址:https://github.com/Raizlabs/DBFlow
    文檔介紹:https://github.com/Raizlabs/DBFlow#usage-docs

5、Android公共庫

  1. Guava
    Google的基於java1.6的類庫集合的擴展項目,包括collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O等等. 這些高質量的API可使你的JAVa代碼更加優雅,更加簡潔
    項目地址:https://code.google.com/p/guava-libraries/
    文檔介紹:https://code.google.com/p/guava-libraries/wiki/GuavaExplained

  2. Volley
    Google提供的網絡通訊庫,使得網絡請求更簡單、更快速
    項目地址:https://android.googlesource.com/platform/frameworks/volley
    文檔介紹:http://commondatastorage.googleapis.com/io-2013/presentations/110%20-%20Volley-%20Easy,%20Fast%20Networking%20for%20Android.pdf

  3. AndroidCommon
    Android公共庫
    項目地址:https://github.com/Trinea/AndroidCommon
    Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
    文檔介紹:http://www.trinea.cn/android/android-common-lib/
    包括:(1)緩存(圖片緩存、預取緩存、網絡緩存)
    (2) 公共View(下拉及底部加載更多ListView、底部加載更多ScrollView、滑動一頁Gallery)
    (3) Android經常使用工具類(網絡、下載、Android資源操做、shell、文件、Json、隨機數、Collection等等)

  4. shipfaster
    整合了Dagger Otto Retrofit Robolectric Picasso OkHttp,方便快速開發
    項目地址:https://github.com/pyricau/shipfaster

  5. CleanAndroidCode
    整合了Dagger Otto AndroidAnnotations,方便快速開發
    項目地址:https://github.com/pyricau/CleanAndroidCode

  6. xUtils
    基於Afinal,包含DbUtils、ViewUtils、HttpUtils、BitmapUtils四大模塊,可用於快速開發
    項目地址:https://github.com/wyouflf/xUtils

  7. Afinal
    Afinal是一個android的ioc,orm框架,內置了四大模塊功能:FinalAcitivity,FinalBitmap,FinalDb,FinalHttp。經過finalActivity,咱們能夠經過註解的方式進行綁定ui和事件。經過finalBitmap,咱們能夠方便的加載bitmap圖片,而無需考慮oom等問題。經過finalDB模塊,咱們一行代碼就能夠對android的sqlite數據庫進行增刪改查。經過FinalHttp模塊,咱們能夠以ajax形式請求http數據
    項目地址:https://github.com/yangfuhai/afinal
    官網網址:http://www.afinal.org

  8. UltimateAndroid
    UltimateAndroid是一個快速開發Android應用的框架,框架目前主要包含的功能有View Injection,ORM,異步網絡請求和圖片加載,自動化腳本測試,磁盤LRU等功能.同時提供了相似於TripleDes、Webview快速設置、Md5處理、String處理,Https處理等經常使用工具類,還有超過100多種UI控件效果。
    項目地址:https://github.com/cymcsg/UltimateAndroid
    官網網址:http://blog.marshalchen.com/UltimateAndroid/

  9. SAF
    SAF(Simple Android Framework)是一個簡單的android框架,它爲開發Android app提供了基礎性組件。
    項目地址:https://github.com/fengzhizi715/SAF
    官網網址:http://www.salesuite.cn/
    包括:(1)Event Bus(事件總線)
    (2) Rest Client(http的框架)
    (3) Image Cache(圖片緩存)
    (4) Dependency Injection(依賴注入)
    (5) Sqlite ORM(sqlite的orm)
    (6) Router(Activity、Fragment的Router)
    (7) Utils(各類經常使用的工具類)

  10. Barber
    Custom View 神器。經過簡單的註解幫助你大大減小 Custom View 中的代碼量。因爲和 ButterKnife 同樣使用了 Annotation Proccessor ,因此對程序性能沒有影響。
    項目地址:https://github.com/hzsweers/barber

  11. device-year-class
    A library that analyzes an Android device's specifications and calculates which year the device would be considered "high end」.(facebook開發的檢測手機主流配置工具)
    項目地址:https://github.com/facebook/device-year-class

6、Android 高版本向低版本兼容

  1. ActionBarSherlock
    爲Android全部版本提供統一的ActionBar,解決4.0如下ActionBar的適配問題
    項目地址:https://github.com/JakeWharton/ActionBarSherlock
    Demo地址:https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
    APP示例:太多了。。如今連google都在用

  2. Nine Old Androids
    將Android 3.0(Honeycomb)全部動畫API(ObjectAnimator ValueAnimator等)兼容到Android1.0
    項目地址:https://github.com/JakeWharton/NineOldAndroids
    Demo地址:https://play.google.com/store/apps/details?id=com.jakewharton.nineoldandroids.sample
    文檔介紹:http://nineoldandroids.com/

  3. HoloEverywhere
    將Android 3.0的Holo主題兼容到Android2.1++
    項目地址:https://github.com/Prototik/HoloEverywhere
    Demo地址:https://raw.github.com/Prototik/HoloEverywhere/repo/org/holoeverywhere/demo/2.1.0/demo-2.1.0.apk
    文檔介紹:http://android-developers.blogspot.com/2012/01/holo-everywhere.html

  4. SherlockNavigationDrawer
    將Android NavigationDrawer和ActionbarSherlock結合,解決4.0如下NavigationDrawer的適配問題
    項目地址:https://github.com/tobykurien/SherlockNavigationDrawer
    文檔介紹:http://developer.android.com/training/implementing-navigation/nav-drawer.html

  5. Notifications4EveryWhere
    將Android 4.1的Notification兼容到Android2.2++
    項目地址:https://github.com/youxiachai/Notifications4EveryWhere

  6. Android Switch Widget Backport
    將Android Switch和SwitchPreference的兼容到Android2.1++
    項目地址:https://github.com/BoD/android-switch-backport
    Demo地址:https://play.google.com/store/apps/details?id=org.jraf.android.backport.switchwidget.sample
    文檔介紹:https://github.com/BoD/android-switch-backport#using-the-switch

  7. android-datepicker
    將Android 4.0的datepicker兼容到Android2.2++
    項目地址:https://github.com/SimonVT/android-datepicker

  8. GlowPadBackport
    Android 4.2的GlowPadView向後適配到API4以上
    項目地址:https://github.com/frakbot/GlowPadBackport

  9. Transitions Everywhere
    Android 4.4 的 Transitions API 兼容到 Android 2.2 以上
    項目地址:https://github.com/andkulikov/transitions-everywhere

7、多媒體相關

  1. cocos2d-x
    跨平臺的2d遊戲框架,支持Android、IOS、Linux、Windows等衆多平臺
    項目地址:https://github.com/cocos2d/cocos2d-x
    文檔介紹:http://www.cocos2d-x.org/wiki
    官網網址:http://www.cocos2d-x.org/

  2. Vitamio
    是一款Android與iOS平臺上的全能多媒體開發框架
    項目地址:https://github.com/yixia/VitamioBundle
    網站介紹:http://www.vitamio.org/docs/
    特色:(1) 全面支持硬件解碼與GPU渲染
    (2) 可以流暢播放720P甚至1080P高清MKV,FLV,MP4,MOV,TS,RMVB等常見格式的視頻
    (3) 在Android與iOS上跨平臺支持 MMS, RTSP, RTMP, HLS(m3u8)等常見的多種視頻流媒體協議,包括點播與直播。

  3. PhotoProcessing
    利用ndk處理圖片庫,支持Instafix、Ansel、Testino、XPro、Retro、BW、Sepia、Cyano、Georgia、Sahara、HDR、Rotate(旋轉)、Flip(翻轉)等各類特效
    項目地址:https://github.com/lightbox/PhotoProcessing
    Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/photo-processing.apk?raw=true

  4. Android StackBlur
    圖片模糊效果工具類
    項目地址:https://github.com/kikoso/android-stackblur
    Demo地址:https://github.com/kikoso/android-stackblur/blob/master/StackBlurDemo/bin/StackBlurDemo.apk?raw=true
    文檔介紹:https://github.com/kikoso/android-stackblur#usage

  5. Bitmap Smart Clipping using OpenCV
    圖片智能裁剪保留重要部分顯示
    項目地址:https://github.com/beartung/tclip-android
    利用淘寶的 http://code.taobao.org/p/tclip/ 庫完成
    一淘玩客正在使用的圖片裁剪,自動識別圖片中的重要區域,而且在圖片裁剪時保留重要區域
    特色:(1). 能進行人臉識別。圖片中有人臉,將自動視爲人臉區域爲重要區域,將不會被裁剪掉
    (2).自動其它重要區域。若是圖片中未識別出人臉,則會根據特徵分佈計算出重區域

  6. Cropper
    圖片局部剪切工具,可觸摸控制選擇區域或旋轉
    項目地址:https://github.com/edmodo/cropper
    效果圖:
    文檔介紹:https://github.com/edmodo/cropper/wiki

  7. android-crop
    圖片裁剪Activity
    項目地址:https://github.com/jdamcd/android-crop
    效果圖:

  8. TileView
    可分塊顯示大圖,支持2D拖動、雙擊、雙指放大、雙指捏合
    項目地址:https://github.com/moagrius/TileView
    Demo地址:http://moagrius.github.io/TileView/TileViewDemo.apk

  9. BlurEffectForAndroidDesign
    圖片模糊效果
    項目地址:https://github.com/PomepuyN/BlurEffectForAndroidDesign

  10. android-eye
    PC端網頁查看同一局域網內的手機攝像頭內容,能夠用來監控哦
    項目地址:https://github.com/Teaonly/android-eye
    Demo地址:https://play.google.com/store/apps/details?id=teaonly.droideye

  11. libpng for Android
    PNG圖片的jni庫,支持幾乎png的全部特性
    項目地址:https://github.com/julienr/libpng-android
    文檔介紹:http://www.libpng.org/pub/png/libpng.html

  12. android-gpuimage
    基於GPU的圖片濾鏡
    項目地址:https://github.com/CyberAgent/android-gpuimage

  13. AndroidFaceCropper
    圖片臉部自動識別,將識別後的局部圖片返回
    項目地址:https://github.com/lafosca/AndroidFaceCropper

  14. Android Video Crop
    利用TextureView播放和剪切視頻,相似ImageView.setScaleType
    項目地址:https://github.com/dmytrodanylyk/android-video-crop
    Demo地址:https://github.com/lafosca/AndroidFaceCropper/releases/download/1.0/FaceCropper-sample-debug-unaligned.apk

  15. svg-android
    Android Svg矢量圖形支持
    項目地址:https://github.com/japgolly/svg-android https://github.com/japgolly/svg-android

  16. Android Visualizer
    從Android MediaPlayer得到音頻,而後像iTunes及WinAmp同樣展現音軌
    項目地址:https://github.com/felixpalmer/android-visualizer

  17. ExoPlayer
    包括儀表板和SmoothStreaming自適應回放,緩存持久化和自定義渲染器,方便自定義和擴展,而且能夠經過應用商店更新
    項目地址:https://github.com/google/ExoPlayer

  18. DanmakuFlameMaster
    android上開源彈幕解析繪製引擎項目
    項目地址:https://github.com/ctiao/DanmakuFlameMaster

8、事件總線(訂閱者模式)

經過發佈/訂閱事件解耦事件發送和接受,從而簡化應用程序組件(Activities, Fragments及後臺線程)之間的通訊

  1. EventBus
    greenrobot的開源項目
    項目地址:https://github.com/greenrobot/EventBus
    文檔介紹:https://github.com/greenrobot/EventBus#general-usage-and-api
    特色:(1) 支持在不一樣類型的線程中處理訂閱,包括髮布所在線程,UI線程、單一後臺線程、異步線程
    (2) 支持事件優先級定義,支持優先級高的訂閱者取消事件繼續傳遞,支持粘性事件,是否是跟系統的有序廣播、粘性廣播很像啊
    (3) 不是基於annotations
    (4) 性能更優
    (5) 體積小
    (6) 支持單例建立或建立多個對象
    (7) 支持根據事件類型訂閱

  2. Otto
    Square的開源項目,基於Guava的Android優化
    項目地址:https://github.com/square/otto
    文檔介紹:http://square.github.io/otto/
    EventBus與Otto的功能及性能對比文檔
    EventBus與Otto性能對比Demo Apk

9、傳感器

  1. Great Android Sensing Toolkit
    Android感應器工具包,包含示例及使用過程當中可能須要的算法
    項目地址:https://github.com/gast-lib/gast-lib
    Demo地址:https://play.google.com/store/apps/details?id=root.gast.playground
    文檔介紹:https://github.com/gast-lib/gast-lib#documentation

  2. SensorManager
    Android傳感器管理
    項目地址:https://github.com/nlathia/SensorManager
    文檔介紹:https://docs.google.com/document/d/1TqThJULb-4e6TGb1gdkAaPCfyuXStjJpbnt7a0OZ9OE/edit

  3. GPSLogger
    記錄GPS信息
    項目地址:https://github.com/mendhak/gpslogger
    Demo地址:https://play.google.com/store/apps/details?id=com.mendhak.gpslogger
    文檔介紹:http://code.mendhak.com/gpslogger/

  4. Pedometer
    計步器,使用硬件計步感應器
    項目地址:https://github.com/j4velin/Pedometer

  5. leapcast
    ChromeCast模擬器的App
    項目地址:https://github.com/dz0ny/leapcast

  6. Arduino-Communicator
    與Arduino通訊的App
    項目地址:https://github.com/jeppsson/Arduino-Communicator

  7. android-pedometer
    Android計步器
    項目地址:https://github.com/bagilevi/android-pedometer
    Demo地址:http://pedometer.googlecode.com/files/Pedometer-1.4.apk

  8. OwnTracks for Android
    本身的軌跡記錄
    項目地址:https://github.com/owntracks/android

  9. Shake Detector library for Android
    Android手機震動搖晃檢測庫,提供供UI線程調用的回調接口
    項目地址:https://github.com/tbouron/ShakeDetector
    Demo地址:https://play.google.com/store/apps/details?id=com.github.tbouron.shakedetector.example

  10. Android heart rate monitor
    Android心跳檢測
    項目地址:https://github.com/phishman3579/android-heart-rate-monitor

  11. Bluetooth LE Library for Android
    藍牙源信息,包括寶庫Mac、更新時間、RSSI、UUID、信號源距離、影響範圍等信息
    項目地址:https://github.com/alt236/Bluetooth-LE-Library---Android
    Demo地址:https://play.google.com/store/apps/details?id=uk.co.alt236.btlescan

  12. farebot
    經過NFC 從公交卡中讀取數據的一個應用
    項目地址:https://github.com/codebutler/farebot

10、安全

  1. SQLCipher
    Sqlite加密工具
    項目地址:https://github.com/sqlcipher/sqlcipher
    文檔介紹:http://sqlcipher.net/sqlcipher-for-android/

  2. Conceal
    快速高效的進行文件加密解密
    項目地址:https://github.com/facebook/conceal
    文檔介紹:https://github.com/facebook/conceal#usage

  3. Android-PasscodeLock
    應用鎖,每次啓動或從任何Activity啓動應用都須要輸入四位數字的密碼方可進入
    項目地址:https://github.com/wordpress-mobile/Android-PasscodeLock
    Demo地址:https://play.google.com/store/apps/details?id=org.wordpress.android
    APP示例:Wordpress Android,支付寶,挖財

  4. GlowPadBackport
    將Android4.2的鎖屏界面解鎖擴展到Android1.6及1.6+
    項目地址:https://github.com/rock3r/GlowPadBackport
    Demo地址:https://play.google.com/store/apps/details?id=net.sebastianopoggi.samples.ui.GlowPadSample
    效果圖:

  5. GlowPadView
    Android 4鎖屏界面解鎖
    項目地址:https://github.com/nadavfima/GlowPadView
    效果圖:https://raw.github.com/nadavfima/GlowPadView/master/example.png

  6. android-lockpattern
    Android的圖案密碼解鎖
    項目地址:https://code.google.com/p/android-lockpattern/
    Demo地址:https://play.google.com/store/apps/details?id=group.pals.android.lib.ui.lockpattern.demo
    文檔介紹:https://code.google.com/p/android-lockpattern/wiki/QuickUse

  7. Android-InsecureBank
    關於 Android 不安全性的示例
    項目地址:https://github.com/dineshshetty/Android-InsecureBankv2

11、插件化

更多見:Android 插件化做用、概念以及不錯的資料(包括開源項目)和解決方案

  1. dynamic-load-apk
    Android 動態加載Apk,熱部署,利用 ClassLoader 以及 Activity 代理的方式解決
    項目地址:https://github.com/singwhatiwanna/dynamic-load-apk
    文檔介紹:http://blog.csdn.net/singwhatiwanna/article/details/22597587

  2. Android Dynamic Loader
    點評的實現方式,和上面不一樣的是:他不是用代理 Activity 的方式實現而是用 Fragment 以及 Schema 的方式實現
    項目地址:https://github.com/mmin18/AndroidDynamicLoader
    Demo地址:https://github.com/mmin18/AndroidDynamicLoader/raw/master/host.apk

  3. xCombine
    Android App插件式插件開發,插件必須先安裝,更推薦看上面兩個開源項目
    項目地址:https://github.com/wyouflf/xCombine
    文檔介紹:http://my.oschina.net/u/1171837/blog/155377

  4. Android Plugin Framework
    Android插件式開發,開放的源碼目前不完整
    項目地址:https://github.com/umeng/apf

  5. multidex
    安裝多 dex 的 classloader
    項目地址:https://github.com/casidiablo/multidex

  6. ANR-WatchDog
    Android ANR 監聽,經過監聽本身的 UI Thread 是否被執行肯定是否發生了 ANR,並能夠設置相關事件
    項目地址:https://github.com/SalomonBrys/ANR-WatchDog

12、文件

對不一樣文檔類型的處理,包括PDF、Word、EPub、Html、Zip等

  1. purePDF
    容許從任何運行的SWF文件讀取和建立PDF文檔
    項目地址:https://github.com/sephiroth74/purePDF

  2. android-pdfview
    快速解析pdf的view,默認支持手勢縮放和相關動畫
    項目地址:https://github.com/JoanZapata/android-pdfview

  3. Office 365 SDK for Android Preview
    可支持Microsoft SharePoint Lists, Microsoft SharePoint Files, Microsoft Exchange Calendar, Microsoft Exchange Contacts, Microsoft Exchange Mail
    項目地址:https://github.com/OfficeDev/Office-365-SDK-for-Android

  4. OpenSpritz-Android
    EPub閱讀器
    項目地址:https://github.com/OnlyInAmerica/OpenSpritz-Android

  5. jsoup
    一個解析html的java庫,可方便的提取和操做數據
    項目地址:https://github.com/jhy/jsoup
    官網網址:http://jsoup.org/
    做用:(1) 從一個url、文件或string得到html並解析
    (2) 利用dom遍歷或css選擇器查找、提取數據
    (3) 操做html元素
    (4) 根據白名單去除用於提交的非法數據防止xss攻擊
    (5) 輸出整齊的html

  6. ZIP
    java壓縮和解壓庫
    項目地址:https://github.com/zeroturnaround/zt-zip
    文檔介紹:https://github.com/zeroturnaround/zt-zip#examples
    做用:(1) 解壓和壓縮,並支持文件夾內遞歸操做
    (2) 支持包含和排除某些元素
    (3) 支持重命名元素
    (4) 支持遍歷zip包內容
    (5) 比較兩個zip包等功能

十3、其餘

  1. Salvage view
    帶View緩存的Viewpager PagerAdapter,很方便使用
    項目地址:https://github.com/JakeWharton/salvage

  2. Android Priority Job Queue
    Android後臺任務隊列
    項目地址:https://github.com/path/android-priority-jobqueue
    文檔介紹:https://github.com/path/android-priority-jobqueue#getting-started

  3. Cobub Razor
    開源的mobile行爲分析系統,包括web端、android端,支持ios和window phone
    項目地址:https://github.com/cobub/razor
    Demo地址:http://demo.cobub.com/razor
    官網網址:http://dev.cobub.com/

  4. Countly
    Android移動端數據採集分析系統
    項目地址:https://github.com/Countly/countly-sdk-android
    官網網址:https://count.ly/

  5. aFileChooser
    文件選擇器,可內嵌到程序中,而無需使用系統或三方文件選擇器。
    項目地址:https://github.com/iPaulPro/aFileChooser

  6. androidpn
    基於xmpp協議的消息推送解決方案,包括服務器端和android端。
    項目地址:https://github.com/dannytiehui/androidpn

  7. Bolts
    Android的異步編程模式
    項目地址:https://github.com/BoltsFramework/Bolts-Android/
    與AsyncTask比較:(1) 使用的是無大小限制的線程池
    (2) 任務可組合可級聯,防止了代碼耦合

  8. CastCompanionLibrary-android
    使Android程序中更快的接入Google Cast
    項目地址:https://github.com/googlecast/CastCompanionLibrary-android
    文檔介紹:https://developers.google.com/cast/

  9. CastVideos-android
    從Android設備分享Video經過Google Cast
    項目地址:https://github.com/googlecast/CastVideos-android
    文檔介紹:https://developers.google.com/cast/

  10. Uninstall_Statics
    Android應用自身被卸載監聽及打開瀏覽器等反饋功能實現
    項目地址:https://github.com/sevenler/Uninstall_Statics
    文檔介紹:http://www.cnblogs.com/zealotrouge/p/3157126.htmlhttp://www.cnblogs.com/zealotrouge/p/3159772.html

  11. Memento
    保證在系統配置改變時,Activity中的某些數據能夠簡單安全的保持不變
    項目地址:https://github.com/mttkay/memento
    文檔介紹:https://github.com/mttkay/memento#usage

  12. FreeFlow
    佈局引擎,更簡單的建立自定義佈局,而且當數據和佈局改變時更美觀的過渡動畫
    項目地址:https://github.com/Comcast/FreeFlow
    Demo地址:https://github.com/Comcast/FreeFlow/releases

  13. Android Gesture Detectors Framework
    Android手勢框架,支持雙指旋轉、移動、平移、縮放等
    項目地址:https://github.com/Almeros/android-gesture-detectors

  14. Mapbox Android SDK
    Android Map的替代版
    項目地址:https://github.com/mapbox/mapbox-android-sdk

  15. Activity animation
    Activity跳轉動畫,支持各個方向波浪的效果
    項目地址:https://github.com/flavienlaurent/activityanimation
    在線演示:https://www.youtube.com/watch?v=-E0sc6w_Jck

  16. KryoNet
    經過NIO提供客戶端和服務器端TCP/UDP網絡傳輸的Java庫
    項目地址:https://github.com/EsotericSoftware/kryonet

  17. Rebound
    一個模仿彈簧反彈的Java庫,可用於建立動畫
    項目地址:https://github.com/facebook/rebound

  18. Android Social Networks
    社交網絡接入統一管理器,可方便的從Twitter, LinkedIn, Facebook, Google Plus登錄、得到我的信息、發送消息、發送專篇、添加或刪除好友
    項目地址:https://github.com/antonkrasov/AndroidSocialNetworks
    Demo地址:https://play.google.com/store/apps/details?id=com.github.androidsocialnetworks.apidemos

  19. SmartAppUpdates
    Android App 增量升級,包含先後端方案、Demo、以及 so 庫,可用於商店或大致積 App 差分升級
    項目地址:https://github.com/cundong/SmartAppUpdates

  20. Magnet
    建立相似 Facebook 聊天桌面懸浮窗的效果
    項目地址:https://github.com/premnirmal/Magnet

  21. Parceler
    經過註解及工具類自動完成實體類 Parcelable及值傳遞
    項目地址:https://github.com/johncarl81/parceler

  22. AcDisplay
    將 Android 的通知都集中到鎖屏顯示
    項目地址:https://github.com/AChep/AcDisplay
    Demo地址:https://play.google.com/store/apps/details?id=com.achep.acdisplay

  23. QrCodeScan
    ZXing和ZBar結合的二維碼掃描項目,提升了掃描效率
    項目地址:https://github.com/SkillCollege/QrCodeScan
    效果圖:

  24. Android-ScreenShot
    實現android系統截屏功能
    項目地址:https://github.com/Android-ScreenShot/AndroidScreenShotService
    文檔介紹:http://blog.csdn.net/buptgshengod/article/details/39155979

  25. card.io SDK for Android
    信用卡掃描 Android SDK
    項目地址:https://github.com/card-io/card.io-Android-SDK
    Demo項目:https://github.com/card-io/card.io-Android-SDK/tree/master/SampleApp

  26. ASNE
    Twitter, Facebook, Google Plus, LinkedIn, Instagram, Vkontakte, Odnoklassniki 的集成庫,包括他們的大多數功能
    項目地址:https://github.com/gorbin/ASNE
    Demo地址:https://play.google.com/store/apps/details?id=com.gorbin.androidsocialnetworksextended.asne

  27. Android Signature Pad
    Android 自定義的簽名 View,可自定義筆顏色和大小
    項目地址:https://github.com/gcacace/android-signaturepad
    Demo項目:https://github.com/gcacace/android-signaturepad/tree/master/SignaturePad-Example

  28. Teleport
    Android Wear 數據同步和消息傳送庫
    項目地址:https://github.com/Mariuxtheone/Teleport

  29. DebugLog
    能夠幫你建立更簡單和更容易理解的調試日誌,可以友好的顯示調試信息所在類和函數。
    項目地址:https://github.com/MustafaFerhan/DebugLog
    效果圖:

  30. Logger
    簡單、美觀並且十分強大的Android日誌工具
    項目地址:https://github.com/orhanobut/logger
    Demo地址:https://github.com/orhanobut/logger/tree/master/app
    效果圖:

第三部分 優秀項目

主要介紹那些Android還不錯的完整項目,目前包含的項目主要依據是項目有意思或項目分層規範比較好。
Linux
項目地址:https://github.com/torvalds/linux
Android
項目地址:https://android.googlesource.com/ 或 https://github.com/android
以上兩個項目,不解釋

(1) ZXing
二維碼掃描工具
項目地址:https://github.com/zxing/zxing 或 https://code.google.com/p/zxing/
APK地址:https://play.google.com/store/apps/details?id=com.google.zxing.client.android
PS:如今市面上不少應用的二維碼掃描功能都是從這個修改而來

(2) photup
編輯機批量上傳照片到facebook上
項目地址:https://github.com/chrisbanes/photup
APK地址:https://play.google.com/store/apps/details?id=uk.co.senab.photup
PS:代碼分包合理,很棒。不過這個項目依賴的開源項目比較多,比較難編譯

(3) github-android
Github的Android客戶端項目
項目地址:https://github.com/github/android
APK地址:https://play.google.com/store/apps/details?id=com.github.mobile

(4) Notes
MIUI便籤
項目地址:https://github.com/MiCode/Notes
APK地址:https://github.com/Trinea/TrineaDownload/blob/master/miui-note-demo.apk?raw=true
PS:項目分包比較合理,相比較miui的文件管理器https://github.com/MiCode/FileExplorer 代碼規範較好得多

(5) weicuiyuan
四次元-新浪微博客戶端
項目地址:https://github.com/qii/weiciyuan
APK地址:https://play.google.com/store/apps/details?id=org.qii.weiciyuan

(6) gnucash-android
一個記帳理財軟件
項目地址:https://github.com/codinguser/gnucash-android
APK地址:http://play.google.com/store/apps/details?id=org.gnucash.android

(7) AntennaPod
支持rss訂閱、音樂訂閱
項目地址:https://github.com/danieloeh/AntennaPod
APK地址:https://play.google.com/store/apps/details?id=de.danoeh.antennapod

(8) ChaseWhisplyProject
打鬼遊戲
項目地址:https://github.com/tvbarthel/ChaseWhisplyProject
APK地址:https://play.google.com/store/apps/details?id=fr.tvbarthel.games.chasewhisply

(9) Tweet Lanes
功能完整的Twitter客戶端
項目地址:https://github.com/chrislacy/TweetLanes
APK地址:https://play.google.com/store/apps/details?id=com.tweetlanes.android

(10) Financius
簡單易用的記帳程序
項目地址:https://github.com/mvarnagiris/Financius
APK地址:https://play.google.com/store/apps/details?id=com.code44.finance

(11) todo.txt-android
todo.txt的官方Android應用
項目地址:https://github.com/ginatrapani/todo.txt-android
APK地址:https://play.google.com/store/apps/details?id=com.todotxt.todotxttouch

(12) simpletask
基於todo.txt官方應用的另外一個客戶端
項目地址:https://github.com/mpcjanssen/simpletask-android
APK地址:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo

(13) Muzei Live Wallpaper
定時更換桌面精美壁紙
項目地址:https://github.com/romannurik/muzei
APK地址:https://play.google.com/store/apps/details?id=net.nurik.roman.muzei

(14) Scanbook
掃描搜索查詢圖書信息
項目地址:https://github.com/JayFang1993/ScanBook
APK地址:http://www.wandoujia.com/apps/com.scanbook

(15) iosched The Google I/O 2014 Android App
項目地址:https://github.com/google/iosched
APK地址:https://play.google.com/store/apps/details?id=com.google.samples.apps.iosched

第四部分 開發工具及測試工具

主要介紹和Android開發工具和測試工具相關的開源項目。

1、開發效率工具

  1. Parceler
    經過註解及工具類自動完成實體類 Parcelable及值傳遞
    項目地址:https://github.com/johncarl81/parceler

  2. Json2Java
    根據JSon數據自動生成對應的Java實體類,還支持Parcel、Gson Annotations對應代碼自動生成。期待後續的提取父類以及多url構建整個工程的功能
    項目地址:https://github.com/jonfhancock/JsonToJava
    在線演示:http://jsontojava.appspot.com/

  3. IntelliJ Plugin for Android Parcelable boilerplate code generation
    Android studio插件,生成Parcelable代碼
    項目地址:https://github.com/mcharmas/android-parcelable-intellij-plugin
    效果圖:

  4. Android Holo Colors IntelliJ Plugin
    Android studio插件,生成holo樣式9 patch圖片
    項目地址:https://github.com/jeromevdl/android-holo-colors-idea-plugin
    效果圖:

  5. Android Drawable Factory
    用於生成各個分辨率的圖片
    項目地址:https://github.com/tizionario/AndroidDrawableFactory
    效果圖:

  6. SelectorChapek for Android
    Android Studio插件,可根據固定文件名格式資源自動生成drawable selectors xml文件。
    項目地址:https://github.com/inmite/android-selector-chapek

  7. Android Action Bar Style Generator
    Android ActionBar樣式生成器,可在線選擇ActionBar樣式自動生成所須要的圖片資源及xml文件
    項目地址:https://github.com/jgilfelt/android-actionbarstylegenerator
    在線演示:http://jgilfelt.github.io/android-actionbarstylegenerator/

  8. ButterKnifeZelezny
    用於快速生成ButterKnifeView注入代碼的Android Studio/IDEA插件
    項目地址:https://github.com/inmite/android-butterknife-zelezny

  9. RoboCoP
    利用Gradle task根據固定格式的json文件生成ContentProvider
    項目地址:https://github.com/mediarain/RoboCoP

  10. appiconsizes
    用於生成各個分辨率的圖片
    項目地址:http://www.appiconsizes.com/

  11. Gradle Retrolambda Plugin
    Retrolambda是將Java8的Lambdas應用於Java7的工具,本項目是Gradle插件,經過Retrolambda從而使Java或Android項目用Java8的Lambdas編寫,將編譯後的字節碼轉換爲Java6和7的字節碼從而正常運行
    項目地址:https://github.com/evant/gradle-retrolambda

  12. Dagger IntelliJ Plugin
    dagger的intellij插件
    項目地址:https://github.com/square/dagger-intellij-plugin

  13. Android Gen Drawable Maven plugin
    在編譯時根據SVG描述文件生成不一樣分辨率的jpg、png或點9圖片
    項目地址:https://github.com/avianey/androidgendrawable-maven-plugin

  14. Android Asset Studio
    各類Android資源自動生成器,包括啓動圖標、ActionBar圖標、通知欄圖標、點9等
    項目地址:https://github.com/romannurik/AndroidAssetStudio
    在線演示:http://romannurik.github.io/AndroidAssetStudio/

  15. jsonschema2pojo
    根據Json內容生成java對象,支持jackjson和gson
    項目地址:https://github.com/joelittlejohn/jsonschema2pojo
    在線演示:http://www.jsonschema2pojo.org/

  16. 9-Patch-Resizer
    自動生成 png 及點 9 圖片的不一樣分辨率版本
    項目地址:https://github.com/redwarp/9-Patch-Resizer

  17. AndroidLocalizationer
    可用於將項目中的 string 資源自動翻譯爲其餘語言的 Android Studio/IntelliJ IDEA 插件
    項目地址:https://github.com/westlinkin/AndroidLocalizationer

2、開發自測相關

  1. Quality Tools for Android
    Android測試及自測工具集合和示例
    項目地址:https://github.com/stephanenicolas/Quality-Tools-for-Android

  2. android-test-kit
    Google的Android測試工具
    包括GoogleInstrumentationTestRunner(加強版的InstrumentationTestRunner)和Espresso(用於快速寫出可靠測試用例的API)
    項目地址:https://code.google.com/p/android-test-kit/
    文檔介紹:https://code.google.com/p/android-test-kit/w/list

  3. robolectric
    測試用例編寫框架
    項目地址:https://github.com/robolectric/robolectric
    Demo地址:https://github.com/robolectric/robolectricsample
    文檔介紹:http://robolectric.org/
    特色:(1). 不須要模擬器在通常JVM就能夠運行測試用例
    (2). 能完成在真機上的大部分測試包括感應器
    其餘的測試用例及相關模塊Mock可見:android-mockmockitoeasy-mock

  4. Android FEST
    提供一些列方便的斷言,可用於提升編寫Android自測代碼效率
    項目地址:https://github.com/square/fest-android

  5. BoundBox
    可用於測試類各類訪問權限的屬性、方法。實際是經過BoundBox這個annotation生成一個屬性和方法都是public權限的中間類並對此類進行測試完成的
    項目地址:https://github.com/stephanenicolas/boundbox

  6. Hugo
    用於打印函數信息及執行時間的工具,僅在debug模式生效
    項目地址:https://github.com/JakeWharton/hugo

  7. scalpel
    在應用下面添加一層用於界面調試,待詳細補充 // TODO
    項目地址:https://github.com/JakeWharton/scalpel

  8. Android Screenshot library
    Android截圖工具類,用於在持續集成時截圖
    項目地址:https://github.com/rtyley/android-screenshot-lib

  9. sonar-android-lint-plugin
    將android lint的錯誤在sonar中展示
    項目地址:https://github.com/SonarCommunity/sonar-android

3、測試工具

  1. Spoon
    可用於android不一樣機型設備自動化測試,能將應用apk和測試apk運行在不一樣機器上並生成相應測試報告。
    項目地址:https://github.com/square/spoon

  2. Tencent APT
    APT是騰訊開源的一個Android平臺高效性能測試組件,提供豐富實用的功能,適用於開發自測、定位性能瓶頸;測試人員完成性能基準測試、競品對比測試
    項目地址:https://github.com/stormzhang/APT

  3. Emmagee
    網易開源的性能測試工具,包括CPU、內存、網絡流量、啓動時間、電池狀態等
    項目地址:https://github.com/NetEase/Emmagee

  4. Android py-uiautomator
    py-uiautomator是一個對Android uiautomator用python進行封裝的測試框架.
    項目地址:https://github.com/xiaocong/uiautomator

  5. Augmented Traffic Control
    模擬網絡情況,包括帶寬、時延抖動、丟包率、錯包率、包重排率
    項目地址:https://github.com/facebook/augmented-traffic-control

  6. stetho
    強大的 Android Debug 工具。支持網絡請求監控以及數據庫查看,能夠和 Chrome DevTools 結合或者命令行模式。
    項目地址:https://github.com/facebook/stetho

4、開發及編譯環境

  1. Buck
    facebook開源的Android編譯工具,效率是ant的兩倍。主要優勢在於:
    (1) 加快編譯速度,經過並行利用多核cpu和跟蹤不變資源減小增量編譯時間實現
    (2) 能夠在編譯系統中生成編譯規則而無須另外的系統生成編譯規則文件
    (3) 編譯同時可生成單元測試結果
    (4) 既可用於IDE編譯也可用於持續集成編譯
    (5) facebook持續優化中
    項目地址:https://github.com/facebook/buck

  2. Android Maven Plugin
    Android Maven插件,可用於對android三方依賴進行管理。在J2EE開發中,maven是很是成熟的依賴庫管理工具,可統一管理依賴庫。
    項目地址:https://github.com/jayway/maven-android-plugin

  3. umeng-muti-channel-build-tool
    渠道打包工具
    項目地址:https://github.com/umeng/umeng-muti-channel-build-tool
    另可參見Google的構建系統Gradle:http://tools.android.com/tech-docs/new-build-system/user-guide

  4. Genymotion
    目前最好用最快的android模擬器
    項目地址:http://www.genymotion.com/
    Android studio集成控件: http://plugins.jetbrains.com/plugin/7269?pr=idea
    Cyril Mottier推薦:http://cyrilmottier.com/2013/06/27/a-productive-android-development-environment/

  5. gradle-mvn-push
    方便的將Gradle的Artifacts上傳到Maven倉庫
    項目地址:https://github.com/chrisbanes/gradle-mvn-push
    文檔介紹:https://github.com/chrisbanes/gradle-mvn-push#usage

  6. Android Emulator Plugin for Jenkins
    Android模擬器 jenkins插件,用於Jenkins作持續集成時跑模擬器測試
    項目地址:https://github.com/jenkinsci/android-emulator-plugin

  7. Android Maven Plugin
    管理應用所須要的依賴庫。包括的構建工具備Maven、Gradle、ant、sbt
    項目地址:https://github.com/mosabua/maven-android-sdk-deployer

  8. SDK Manager Plugin
    下載和管理Android SDK的Gradle插件
    項目地址:https://github.com/JakeWharton/sdk-manager-plugin

  9. Gradle Protobuf Plugin
    將.proto文件轉換成Java文件的gradle插件
    項目地址:https://github.com/andrewkroh/gradle-protobuf-plugin

  10. ChromeADB
    Chrome 的 Adb 插件,當登陸後,能看到全部鏈接的設備並操做,能夠看應用、進程、內存及磁盤使用狀況等
    項目地址:https://github.com/importre/chromeadb

5、其餘

  1. ViewServer
    容許app運行在任何手機上均可以用HierarchyViewer查看
    項目地址:https://github.com/romainguy/ViewServer

  2. GridWichterle for Android
    在整個系統上顯示一個grid,用來幫助查看應用佈局及使得佈局更美觀,可設置grid網格大小和顏色,android推薦48dp和8dp,可見 Android Design Guidelines – Metrics and Grids,比起hierarchyviewer相差甚遠,不過偶爾可用來做爲佈局查看工具。
    項目地址:https://github.com/inmite/android-grid-wichterle
    Demo地址:https://play.google.com/store/apps/details?id=eu.inmite.android.gridwichterle

  3. Catlog
    手機端log查看工具,支持不一樣顏色顯示、關鍵字過濾、級別過濾、進程id過濾、錄製功能等
    項目地址:https://github.com/nolanlawson/Catlog
    在線演示:https://play.google.com/store/apps/details?id=com.nolanlawson.logcat

  4. PID Cat
    根據package查看logcat日誌
    項目地址:https://github.com/JakeWharton/pidcat

  5. ACRA
    應用崩潰信息日誌上報到GoogleDoc工具,網頁版展示結果三方開源地址https://github.com/BenoitDuffez/crashreportsviewer
    項目地址:https://github.com/ACRA/acra
    文檔介紹:https://github.com/ACRA/acra/wiki/BasicSetup

  6. Crashlytics
    提供豐富的應用崩潰信息日誌收集
    輕量級,豐富,可自定義應用崩潰信息收集器,附有郵件通知
    項目地址:http://www.crashlytics.com/
    集成插件:Android Studio, Eclipse and IntelliJ

  7. Android Resource Navigator
    chrome插件,能夠方便的查看github上android源碼工程的styles.xml和themes.xml。主要功能:
    (1) 快速打開android styles.xml themes.xml
    (2) 方便在資源間跳轉。styles.xml themes.xml文件中資源連接跳轉,能夠方便跳轉到某個資源
    (3) 方便查找某個style和theme。chrome地址欄輸入arn+tab+搜索內容回車便可
    (4) 自動下載不一樣分辨率下的drawable
    (5) 經過映射查找那些不是按照固定命名規則命名的style和theme
    項目地址:https://github.com/jgilfelt/android-resource-navigator
    在線演示:https://chrome.google.com/webstore/detail/android-resource-navigato/agoomkionjjbejegcejiefodgbckeebo?hl=en&gl=GB

  8. android-resource-remover
    根據lint的提示刪除項目中無用的資源,減小包的大小
    項目地址:https://github.com/KeepSafe/android-resource-remover

  9. Telescope
    經過手勢截圖以特定主題發送到特定郵箱地址報告Bug
    項目地址:https://github.com/mattprecious/telescope

  10. Complete Android Fragment & Activity Lifecycle
    完整的Android Fragment/Activity生命週期圖
    項目地址:https://github.com/xxv/android-lifecycle

  11. Bugsnag Notifier for Android
    經過Thread.UncaughtExceptionHandler捕獲應用未處理的異常崩潰 Bug 並用 Notification 展現同時上傳到後臺服務器
    項目地址:https://github.com/bugsnag/bugsnag-android
    文檔介紹:https://github.com/bugsnag/bugsnag-android#installation--setup

  12. Material Design Icons
    Google Material Design 規範中的 Icon
    項目地址:https://github.com/google/material-design-icons

  13. scrollscreenshot
    Android 滾動屏幕自動截圖 jar 包,支持縱向、橫向滾動截屏拼接
    項目地址:https://github.com/PGSSoft/scrollscreenshot
    效果圖:

  14. droidicon
    1600+的海量Icon,包括750+的Material Design icons
    項目地址:https://github.com/theDazzler/droidicon

第五部分

主要介紹那些樂於分享而且有一些很不錯的開源項目的我的和組織。Follow大神,深挖大神的項目和following,你會發現不少。

1、我的

  1. JakeWharton
    就任於Square,絕對牛逼的大神,項目主要集中在Android版本兼容,ViewPager及開發工具上
    Github地址:https://github.com/JakeWharton
    表明做:ActionBarSherlock,Android-ViewPagerIndicator,Nine Old Androids,SwipeToDismissNOA,hugo,butterknife,Android-DirectionalViewPager, scalpel
    pidcat另外對square及其餘開源項目有不少貢獻
    主頁:http://jakewharton.com/

  2. Chris Banes
    Github地址:https://github.com/chrisbanes
    表明做:ActionBar-PullToRefresh,PhotoView,Android-BitmapCache,Android-PullToRefresh
    主頁:http://chris.banes.me/

  3. Koushik Dutta
    就任於ClockworkMod
    Github地址:https://github.com/koush
    表明做:Superuser,AndroidAsync,UrlImageViewHelper,ion, 另外對https://github.com/CyanogenMod 的開源項目有不少貢獻
    主頁:http://koush.com/

  4. Simon Vig
    Github地址:https://github.com/SimonVT
    表明做:android-menudrawer,MessageBar
    主頁:http://simonvt.net/

  5. Manuel Peinado
    Github地址:https://github.com/ManuelPeinado
    表明做:FadingActionBar,GlassActionBar,RefreshActionItem,QuickReturnHeader

  6. Emil Sj?lander
    Github地址:https://github.com/emilsjolander
    表明做:StickyListHeaders,sprinkles,android-FlipView
    主頁:http://emilsjolander.se/

  7. greenrobot
    Github地址:https://github.com/greenrobot
    表明做:greenDAO,EventBus
    主頁:http://greenrobot.de/

  8. Jeff Gilfelt
    Github地址:https://github.com/jgilfelt
    表明做:android-mapviewballoons,android-viewbadger,android-actionbarstylegenerator,android-sqlite-asset-helper
    主頁:http://jeffgilfelt.com

  9. Romain Guy
    Android team成員(2013.10已離開Android team,仍在Google)
    Github地址:https://github.com/romainguy
    表明做:ViewServer
    主頁:http://www.curious-creature.org/category/android/
    個人攝影做品:http://www.flickr.com/photos/romainguy

  10. sephiroth74
    就任於Aviary.com
    Github地址:https://github.com/sephiroth74
    表明做:ImageViewZoom,HorizontalVariableListView,AndroidWheel,purePDF
    主頁:http://www.sephiroth.it/

  11. Cyril Mottier
    Google開發者專家認證,發佈一些Android技巧及文章
    Github地址:https://github.com/cyrilmottier
    表明做:GreenDroid,Polaris
    主頁:http://cyrilmottier.com/

2、組織

  1. Square
    有態度有良心的企業,不少不錯的分享
    Github地址:https://github.com/square
    表明做:okhttp、fest-android,android-times-square、picasso、dagger、spoon等等
    主頁:http://square.github.io/

  2. Inmite s.r.o.
    Github地址:https://github.com/inmite
    表明做:android-styled-dialogs,android-grid-wichterle,android-selector-chapek
    主頁:http://www.inmite.eu/

3、博客

部分國外著名 Android 開發者信息

License

Copyright 2014 trinea.cn

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 

7種無須編程的DIY開發工具 你知道幾個?

現現在,各類DIY開發工具不斷的出現,使得企業和我的在短短几分鐘內就能完成應用的建立和發佈,大大節省了在時間和資金上的投入。此外,DIY工 具的出現,也幫助廣大不具有專業知識和技術的「移動開發粉」建立本身的應用提供了條件。本文從DIY開發工具提及,爲廣大企業和我的介紹了7款無需學習任 何編程語言,只需運用工具中所提供的各類豐富的功能模塊,即可在幾分鐘內完成建立和發佈移動應用的DIY開發工具。

1. Appmakr

Appmakr是一款功能強勁的DIY移動應用開發工具,目前支持iOSAndroid和Windows Phone等移動平臺。Appmakr可讓用戶無需編程就能在分秒鐘內建立iOS和Android應用。Appmakr還提供一些其它的功能,包括將網 站鏈接到應用程序、支持HTML5、推送通知和廣告支持。除此以外,用戶可使用本身的開發許可,將應用程序發佈到所屬的應用商店中。

 

主要特性:

免費:用戶無需付費便可經過應用Appmakr建立想要的應用。若是用戶想要獲取更多的功能或將應用貨幣化,能夠向Appmakr支付必定的費用。 功能強勁:內置的推送和廣告通知、支持Html5、原生高分辨率相冊和定位等功能。操做簡單:Appmakr爲用戶提供一個無代碼操做環境,讓用戶能夠不 用編寫代碼就能夠在幾分鐘內建立一個移動應用。跨平臺特性:用戶能夠根據本身的須要自由選擇所需的開發環境,而且能作到一次編寫便可生成多平臺支持的應 用。

2. AppsBuilder

AppsBuilder是一款在線跨平臺DIY移動開發工具,爲用戶提供快捷的應用程序解決方案,目前AppsBuilder支持包括iOS、 Windows Phone和Android等在內的多種移動平臺。用戶所建立的應用程序將會存儲到AppsBuilder的雲系統中,用戶能夠實時地更新應用的內容和布 局。除此以外,AppsBuilder還爲用戶提供強大的推送功能。目前AppsBuilder資費爲12美圓每個月。

 

主要特性:

操做簡單: AppsBuilder爲用戶提供一個可視化的開發環境,用戶無需具有專業知識,便可在分秒鐘內快速的建立一個應用程序。功能強 大:AppsBuilder能夠方便地建立、設計、編輯和推送本地應用程序,經過簡單的「拖拽」操做,來簡化移動應用的開發流程,讓用戶盡情地享受開發的 樂趣。實時的功能預覽:AppsBuilder能夠爲用戶提供實時地預覽功能,實時的跟蹤App的性能。100%的可制定性:用戶經過 AppsBuilder可使用本身的面板,上傳本身所喜歡的背景圖片和圖標來保證100%的可制定佈局,瞬間讓你的應用獨一無二。

3. BuildAnApp

BuildAnApp是一個跨平臺DIY開發工具,專爲中小型企業、社區團體和專業服務機構打造。目前支持包括iOS、Android和Windows Phone等多種移動平臺。BuildAnApp旨在爲用戶打造一個快捷的移動應用建立和優化的開發環境。

 

 

主要特性:

多平臺支持:經過使用BuildAnApp,用戶能夠根據本身的須要自由選擇所需的開發環境,並能作到一次編寫,隨處運行。除此以外,用戶也能夠通 過瀏覽器來查看用BuildAnApp建立的移動應用。高度的可制定性:BuildAnApp爲用戶提供了多種自定義的模板,用戶無需具有任何編程基礎就 可輕鬆地建立和發佈應用程序。操做簡單:BuildAnApp獨具的快速DIV設計,用戶只須要6個步驟便可完成一個應用程序的建立和設計。

4. iBuildApp

iBuildApp是一款免費的跨平臺快速DIY移動應用開發平臺,截止目前爲止,經過iBuildApp建立的移動應用程序已超過35000個。 經過iBuildApp,用戶無需編碼就能夠在幾分鐘內建立而且發佈應用程序。此外,iBuildApp還爲客戶提供其它的關鍵功能,包括移動商務、移動 應用程序管理、社交網絡和植入廣告等功能。

 

 

主要特性:

操做簡單:經過工具所提供的模板,用戶無需專業技能和編程能力就能夠在分秒鐘內建立和發佈應用程序。跨平臺特性:支持現有iOS和Android等 主流的移動平臺。推送通知:爲用戶提供推送通知和GPS通知。廣告植入功能:容許用戶在所建立的應用程序中植入廣告。Web服務和數據同步:爲用戶提供應 用程序、照片、數據等更新功能。其它主要功能:QR碼、社區分享和植入小部件等。

5. TheAppBuilder

TheAppBuilder是一款跨平臺的DIY移動應用程序開發套件。目前天天有數以萬計的用戶使用TheAppBuilder來建立和發佈應用 程序。經過TheAppBuilder的數據庫、「拖拽"功能和在線教程,用戶無需具有任何的專業知識和編程能力便可建立本身的應用程序。

 

 

主要特性:

免費:TheAppBuilder容許用戶免費建立多個應用程序,而且能夠無償使用套件的高級功能來創新和嘗試新的設計理念。高度的可定製性: 用戶經過TheAppBuilder的模板能夠輕鬆地定製應用程序的結構。經過內置的模板和」拖拽「功能,用戶能夠在幾分鐘內輕鬆地建立一個應用程序。跨 平臺發佈:用戶只須要一次建立就能夠把應用程序發佈到包括iOS、Android、Windows Phone和HTML5等在內的平臺上。

6. Attendify

Attendify是一項便捷的應用開發服務。與其它的DIY開發工具同樣,Attendify一樣提供豐富的內容模板,用戶能夠根據所提供的模板 快速開發出iOS和Android應用。此外,Attendify還具備應用程序預覽功能,幫助用戶更好更快地建立並管理應用。

 

 

主要特性:

實時預覽:Attendify獨具的徹底引導功能,讓用戶在建立應用程序的過程當中能夠實時地預覽和管理所建立的應用。快速建立:用戶經過 Attendify提供的模板,就可快速地建立App,而無需去掌握任何編程技術。高度DIY:Attendify容許用戶自由地上傳本身的圖標、定製自 己的啓動畫面和應用程序外觀,讓你的應用馬上脫穎而出。快速推送:一旦用戶提交所建立的應用,Attendify會當即將應用發佈到App Store和Google Play。

7. AppMachine

AppMachine是一款跨平臺的快速開發工具,目前支持iOS和Android兩大主流平臺。用戶能夠經過修改AppMachine所提供的 20種應用設計模板來進行App設計。這樣一來,沒有編程經驗的用戶也能夠經過使用AppMachine來建立App。另外用戶也能夠本身DIY,添加包 括新聞、LBS、社交媒體、拍照、攝像等多個集成內容。

 

 

主要特性:

功能強大:用戶可使用模板組建應用,也能夠自主從頭進行設計,添加包括新聞、LBS、社交媒體、拍照、攝像等多個集成內容。輕鬆建立:經過 AppMachine提供的應用模板,用戶可以快速的建立獨具特點的應用。徹底本地化:相對於大多數移動應用DIY產品來講,AppMachine並不依 賴於HTML5,從而實現了真正的徹底本地化。實時地測試預覽:AppMachine提供AppMachine Previewer功能,讓用戶可以提早預覽他們建立和設計的應用。

 

AppGyver

 

 

AppGyver爲移動開發提供了一系列的工具,其中包括了PhoneGap應用Steroids和Prototyper等。Prototyper能夠把一些網頁組合在一塊兒,開發者能夠創建實體模型並與團隊成員及客戶共同測試創意思路。Steroids容許開發人員利用他們更爲熟悉的Web開發技術編寫本機移動應用,這種方式比直接使用本機代碼簡單得多。

Firebase

 

 

數據是任何應用的源泉,擁有了Firebase,信息的存儲和分享會變得輕鬆許多。做爲一款網絡應用實時後臺,Firebase幫助用戶擺脫管理服務器的麻煩,快速建立應用。在創建項目以後,Firebase能夠將創建key value庫引起的衝突妥善地處理好,這樣用戶就能夠專一問題自己,節省開發時間,迅速完成應用。

Intel XDK

 

 

提起Intel你們想到的都是硬件相關的事情, 可是Intel在今年發佈的Intel XDK是一款支持HTML5開發的工具,用戶能夠經過瀏覽器來測試本身的項目。最新版Intel XDK的改進包括一個新型拖放界面,該界面可加快新應用程序、原型以及更快速的遊戲界面的開發。此外,英特爾還在新版Intel XDK中加入了更強大的開發框架,可根據設備的本機主題開發與之相適應的應用程序。

Appscend

 

 

Appscend提供了一個進行跨平臺開發工做的雲環境,支持用程序的管理、分析及消息推送等功能。Appscend將一個基於模板的設計系統和一個雲基礎的CMS捆綁在一塊兒,你須要作的就是加一些廣告,點幾個按鈕把結果上傳到App Store和Google Play上。

Icenium Mist

 

 

Icenium Mist是個基於瀏覽器的開發環境,開發者能夠在任何地方僅經過Web瀏覽器便可建立應用。Icenium Mist簡化了跨平臺混合移動應用的開發,它利用了雲的能力與靈活性,使用HTML、CSS與JavaScriptiOSAndroid設備構建應用。

Parse

 

 

Parse是一款基於Baas的後端雲存儲服務平臺,爲開發者提供雲端數據的存儲和讀取。Parse提供了一套用於儲存數據和推送消息的API。Parse很是的穩定,兼容性和靈活性強,相對於其餘Baas平臺,Parse在上手方面是最爲容易的。

Tabris

 

 

若是你是一個Java程序員,可能你會爲Android和Blackberry編寫程序。有了Tabris,開發者能夠像編寫Android程序那樣用Java編寫iOS程序。Java的代碼首先在服務器上運行,接着以JSON包的形式將數據發送到Android和iOS上,利用本地的窗口組建將JSON代碼進行解譯後顯示出來。此外,Tabris 基於Eclipse RAP(Rich Ajax Platform),提供了用於構建移動客戶端的原生部件。經過本地客戶端和服務器端應用的結合,簡化了Java開發者的應用開發工做。

Appcelerator Titanium

 

 

Titanium應用程序使用HTML,JavaScript和CSS進行開發,並支持PHP、Ruby和Python。應用程序可使用Appceelerator API訪問本地特性,用戶界面組件和相似於Analytic的可選模塊。Titanium把Jabascript和本地庫連接在一塊兒,而後把它編譯成字節碼。iOS或者Android SDK編譯器能夠爲目標平臺構建一個軟件包。

Sencha Architect

 

 

Sencha Architect構建在該公司的Html5佈局工具Ext Designer之上,並擴展了其功能,爲桌面與移動Web應用的構建提供更爲普遍的應用設計環境。經過聯合使用Sencha Touch與Ext JS 4,Sencha Architect旨在提高開發者的生產效率並驅動應用設計模式上的最佳實踐。Senchca Architect提供了一個可視化的畫布與代碼編輯平臺,而且使用了拖放的方式,旨在快速實現移動與桌面應用的裝配。開發好應用後,開發者就能夠經過Sencha Architect打包應用以部署到Web上或是發佈到原生的應用商店中。

Corona SDK

 

 

專門針對跨平臺的Corona SDK涵蓋了爲iOS、Android、Kindle Fire和Nook設計應用的全部特徵,還有一款必不可少的物理引擎。Corona SDK支持硬件加速、GPS、指南針及照相機,支持與Map、Facebook、OpenFient、GameCenter的集成,腳本語言Lua也是易於上手。

 

1、Afinal框架

項目地址:https://github.com/yangfuhai/afinal

主要有四大模塊:
 (1) 數據庫模塊:Android中的orm框架,使用了線程池對sqlite進行操做。
 (2) 註解模塊:android中的ioc框架,徹底註解方式就能夠進行UI綁定和事件綁定。無需findViewById和setClickListener等。
 (3) 網絡模塊:經過httpclient進行封裝http數據請求,支持ajax方式加載,支持下載、上傳文件功能。
 (4) 圖片緩存模塊:經過FinalBitmap,imageview加載bitmap的時候無需考慮bitmap加載過程當中出現的oom和android容器快速滑動時候出現的圖片錯位等現象。
             FinalBitmap能夠配置線程加載線程數量,緩存大小,緩存路徑,加載顯示動畫等。FinalBitmap的內存管理使用lru算法
             沒有使用弱引用(android2.3之後google已經不建議使用弱引用,android2.3後強行回收軟引用和弱引用,詳情查看android官方文檔),
             更好的管理bitmap內存。FinalBitmap能夠自定義下載器,用來擴展其餘協議顯示網絡圖片,好比ftp等。同時能夠自定義bitmap顯示器,
             在imageview顯示圖片的時候播放動畫等(默認是漸變更畫顯示)。

 

2、xUtils框架


項目地址: https://github.com/wyouflf/xUtils
主要有四大模塊:
  (1) 數據庫模塊:android中的orm框架,一行代碼就能夠進行增刪改查;
            支持事務,默認關閉;
            可經過註解自定義表名,列名,外鍵,惟一性約束,NOT NULL約束,CHECK約束等(須要混淆的時候請註解表名和列名);
            支持綁定外鍵,保存實體時外鍵關聯實體自動保存或更新;
            自動加載外鍵關聯實體,支持延時加載;
            支持鏈式表達查詢,更直觀的查詢語義,參考下面的介紹或sample中的例子。          
  (2) 註解模塊:android中的ioc框架,徹底註解方式就能夠進行UI,資源和事件綁定;
            新的事件綁定方式,使用混淆工具混淆後仍可正常工做;
            目前支持經常使用的20種事件綁定,參見ViewCommonEventListener類和包com.lidroid.xutils.view.annotation.event。
  (3) 網絡模塊:支持同步,異步方式的請求;
            支持大文件上傳,上傳大文件不會oom;
            支持GET,POST,PUT,MOVE,COPY,DELETE,HEAD,OPTIONS,TRACE,CONNECT請求;
            下載支持301/302重定向,支持設置是否根據Content-Disposition重命名下載的文件;
            返回文本內容的請求(默認只啓用了GET請求)支持緩存,可設置默認過時時間和針對當前請求的過時時間。            
  (4) 圖片緩存模塊:加載bitmap的時候無需考慮bitmap加載過程當中出現的oom和android容器快速滑動時候出現的圖片錯位等現象;
            支持加載網絡圖片和本地圖片;
            內存管理使用lru算法,更好的管理bitmap內存;
            可配置線程加載線程數量,緩存大小,緩存路徑,加載顯示動畫等...

 

 

3、ThinkAndroid

項目地址: https://github.com/white-cat/ThinkAndroid
主要有如下模塊:
  (1)  MVC模塊:實現視圖與模型的分離。
  (2)  ioc模塊:android中的ioc模塊,徹底註解方式就能夠進行UI綁定、res中的資源的讀取、以及對象的初始化。 
  (3)  數據庫模塊:android中的orm框架,使用了線程池對sqlite進行操做。  
  (4)  http模塊:經過httpclient進行封裝http數據請求,支持異步及同步方式加載。
  (5)  緩存模塊:經過簡單的配置及設計能夠很好的實現緩存,對緩存能夠隨意的配置
  (6)  圖片緩存模塊:imageview加載圖片的時候無需考慮圖片加載過程當中出現的oom和android容器快速滑動時候出現的圖片錯位等現象。
  (7)  配置器模塊:能夠對簡易的實現配對配置的操做,目前配置文件能夠支持Preference、Properties對配置進行存取。
  (8)  日誌打印模塊:能夠較快的輕易的是實現日誌打印,支持日誌打印的擴展,目前支持對sdcard寫入本地打印、以及控制檯打印
  (9)  下載器模塊:能夠簡單的實現多線程下載、後臺下載、斷點續傳、對下載進行控制、如開始、暫停、刪除等等。
  (10) 網絡狀態檢測模塊:當網絡狀態改變時,對其進行檢

 

功 能:ThinkAndroid是一個免費的開源的、簡易的、遵循Apache2開源協議發佈的Android開發框架,其開發宗旨是簡單、快速的進行 Android應用程序的開發,包含Android mvc、簡易sqlite orm、ioc模塊、封裝Android httpclitent的http模塊, 具備快速構建文件緩存功能,無需考慮緩存文件的格式,均可以很是輕鬆的實現緩存,它還基於文件緩存模塊實現了圖片緩存功能, 在android中加載的圖片的時候,對oom的問題,和對加載圖片錯位的問題都輕易解決。他還包括了一個手機開發中常常應用的實用工具類, 如日誌管理,配置文件管理,android下載器模塊,網絡切換檢測等等工具。

優勢:功能看起來比較完善。

缺點:這個是white-cat我的寫的,從2013年就中止維護了,沒有項目文檔。

 

4、LoonAndroid 

項目地址: https://github.com/gdpancheng/LoonAndroid
主要有如下模塊:
  (1)  自動注入框架(只須要繼承框架內的application既可)
  (2)  圖片加載框架(多重緩存,自動回收,最大限度保證內存的安全性)
  (3)  網絡請求模塊(繼承了基本上如今全部的http請求)
  (4)  eventbus(集成一個開源的框架)
  (5)  驗證框架(集成開源框架)
  (6)  json解析(支持解析成集合或者對象)
  (7)  數據庫(不知道是哪位寫的 忘記了)
  (8)  多線程斷點下載(自動判斷是否支持多線程,判斷是不是重定向)
  (9)  自動更新模塊
  (10) 一系列工具類

 

五.UltimateAndroid

主要功能:

UltimateAndroid是一套集成了許多現有優秀的Android開源類庫並將之組合成一個總體的Android快速開發框架。框架目前主要包含的功能有View Injection,ORM,異步網絡請求和圖片加載,自動化腳本測試,磁盤LRU等功能.同時提供了相似於TripleDesWebview快速設置、Md5處理、String處理,Https處理等經常使用工具類,還有多種UI控件效果。而且這些功能正在逐步增長中。本套教程主要是介紹UltimateAndroid框架的使用,同時會採用一個項目做爲例子來說述如何更好的使用UltimateAndroid,也是一套Android快速開發的教程

一、部署UltimateAndroid框架(Eclipse版和AndroidStudio)

 

二、導入DemoOfUi,實現多種UI效果

三、例程:項目介紹和初始化

四、啓動效果處理

五、數據庫結構處理

主要模塊:

1.框架核心模塊包括視圖注入,ORM,異步的Http與圖像請求等內容。

2.UltimateAndroid 使用了許多優秀的開源框架

3.目前的項目結構還未採用Gradle,可能在將來某一時間會採用

目前採用的核心開源類庫有:

1.視圖注入Butter Knife

2.異步網絡請求 Asynchronous Http Client for Android.

3.異步圖片加載Universal Image Loader for Android

4.ORM一:greenDAO

5.ORM二:ActiveAndroid

 

 

六.androidannotations

 
項目地址:http://androidannotations.org/
 

功能:徹底註解框架,一切皆爲註解:聲明控件,綁定控件,設置監聽,setcontentview,長按事件,異步線程,所有經過註解實現。

優勢:徹底的註解,使開發起來更加便利,程序員寫的代碼也更少。

缺點:文檔是全英文的加上功能比較少沒有具體研究,因爲一切都是註解,感受效率不高,不過根據官方介紹說並非使用的反射加載,因此效率比通常註解高不少。

 
 

七.KJFrameForAndroid

功 能:一個android的orm 和 ioc 框架。同時封裝了android中的Bitmap與Http操做的框架,使其更加簡單易用; KJFrameForAndroid開發框架的設計思想是經過封裝Android原生SDK中複雜的複雜操做而達到簡化Android應用級開發,最終實 現快速而又安全的開發APP。總共分爲五大模 塊:UILibrary,UtilsLibrary,HttpLibrary,BitmapLibrary,DBLibrary。

優勢:功能比較全面,代碼效率很高,文檔完善,有項目demo,借鑑了不少大型框架經驗。

缺點:框架的Activity部分最低,項目交流平臺沒多少人說話(難道大神都是不說話的?)

KJFrameForAndroid 又叫KJLibrary,是一個android的orm 和 ioc 框架。同時封裝了android中的Bitmap與Http操做的框架,使其更加簡單易用;

KJFrameForAndroid的設計思想是經過封裝Android原生SDK中複雜的複雜操做而達到簡化Android應用級開發,最終實現快速而又安全的開發APP。咱們提倡用最少的代碼,完成最多的操做,用最高的效率,完成最複雜的功能。
同時,KJFrameForAndroid是免費的、開源的、簡易的、遵循Apache Licence 2.0開源協議發佈的android應用開發框架,總共分爲五大模 塊:UILibrary,UtilsLibrary,HttpLibrary,BitmapLibrary,DBLibrary。

 

八.AndroidCommon 

包含一組開發 Android 程序經常使用的庫,包括 ImageCache、DropDownListView、DownloadManager 和靜默安裝 APK 等等。
 
功能模塊:
1. 緩存(圖片緩存、預取緩存、網絡緩存)
2. 公共View(下拉及底部加載更多ListView、底部加載更多ScrollView、滑動一頁Gallery)
3. Android經常使用工具類(網絡、下載、Android資源操做、shell、文件、Json、隨機數、Collection等等)

優勢:Android項目的通用工具類的集合
 

九.andbase

項目地址:https://github.com/zhaoqp2010/andbase/

 項目地址:http://www.amsoft.cn/andbase.html

1.andbase中包含了大量的開發經常使用手段。

如網絡下載,多線程與線程池的管理,數據庫ORM,圖片緩存管理,圖片文件下載上傳,Http請求工具,SOAP工具類,異步Task,經常使用工具類(字符串,日期,文件處理,圖片處理工具類等),可以使您的應用在團隊開發中減小冗餘代碼,很大的提升了代碼的維護性與開發高效性,能很好的規避因爲開發疏忽而致使常犯的錯誤。

2.andbase封裝了大量的經常使用控件。

如list分頁,grid分頁,下拉刷新,進度框,圖片輪播,表格,多線程下載器,側邊欄,圖片上傳,輪子選擇,圖表,Tab滑動,日曆選擇器等。

3.強大的AbActivity,您沒有理由不繼承它。

繼承它你可以得到一個簡單強大可設置的操做欄,以及一系列的簡單調用,如彈出框,提示框,進度框,副操做欄等。

4.提供效率較高圖片緩存管理策略,使內存大幅度節省,利用率提升,效率提升。

程序中要管理大量的圖片資源,andbase提供簡單的方法,幾步完成下載與顯示,並支持縮放,裁剪,緩存功能,OOM不在有。

5.封裝了大量常見工具類。

包括日期,字符,文件,圖片,數學,View萬能適配工具類等各類處理函數, 多而全。

6.用andbase大量減小handler的使用,而採用回調函數,代碼更整潔。

handler會產生大量代碼,而且很差維護,andbase對handler進行了封裝,你會發現用了andbase基本代碼中不會再有大量的handler判斷語句。

7.簡單輕量支持註解自動建表的ORM框架(支持一/多對多的關聯操做)。

寫sql,建表,工做量大,andbase提供更傻瓜異步增刪改查工具類,數據庫在內置卡和外置卡均可以。

8.異步請求http框架,網絡請求標準化,支持文件上傳下載,get,post,進度顯示。

包含了異步與http請求的工具類,SOAP請求工具類,簡單實用。

相關文章
相關標籤/搜索