zzy619 / rocket

Rocket is an android lightweight framework with rest APIs and image cache features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rocket

======

Rocket is an android lightweight framework with rest APIs and image cache features.Which based on google volley library. For better convenience, we wrapped the volley and do some extra updates. And we add the cool features like : rest api, https, supporting from 2.2 and above sdks for image cache(You needn't to worry about the OOM issue below 3.0 sdks).

Features:

  • rest apis
  • image downloader
  • image cache(LRU)
  • https
  • cookie
  • cache strategy

Usage

Rest apis:

Rocket.with(getActivity())
.targetType(IntrosInfo.class)
.invoke(new JsonCallback<IntrosInfo>() {

	@Override
	public void onCompleted(RocketError error, IntrosInfo result) {
		handleResult(error, result);
	}
})
.load(uri);

Image downloader:

Rocket.with(mImageView)
.placeholder(R.drawable.bg_list_header)
.skipMemoryCache()
.invoke(new ImageCallback() {
					
	@Override
	public void onComplete(RocketError error, Bitmap result) {
		if(error == null) {
			hasFetched = true;
		}
	}
})
.load(requestUrl);

Image cache:

Rocket.with(holder.image)
.placeholder(R.drawable.bg_row_icon)
.load(url);

realease

current version : V1.0beta

support

android 2.2sdk and above

Contributors

About

Rocket is an android lightweight framework with rest APIs and image cache features.