Day5


Time : October 26th,2015 / Author : xiaomeixw

library

1.UI:

  • PagerSlidingTabStrip --- (From astuetz) : An interactive indicator to navigate between the different pages of a ViewPager. [ViewPage指示器].

  • PagerSlidingTabStrip --- (forked from astuetz/PagerSlidingTabStrip & Author jpardogo) : An interactive indicator to navigate between the different pages of a ViewPager but this library can change the tab's color.. [ViewPage指示器,能改变tab的颜色].

  • AndroidRubberIndicator --- (From LyndonChin) : A rubber indicator for ViewPager. [View滑动指示器].

  • rubber-loader --- (From greenfrvr) : Android indeterminate loader widget with rubber shape and color transitions. [loading时的橡胶动画效果].

  • hashtag-view --- (From greenfrvr) : Android fully customizable widget for representing data like hashtags collection and similiar. [自定义的标签View].

2.Logic:

  • quitnow-cache --- (From Fewlaps & Tag is Caching) : A memcached-like Java cache, focused on portability. [可限时销毁的cache].

      QNCache cache = new QNCacheBuilder().createQNCache();
    
      cache.set("key", "value", 60 * 1000); // It can store things for a minute,
      cache.set("key", "value", 60 * 60 * 1000); // for an hour,
      cache.set("key", "value", 0); // or forever.
      cache.set("key", "value"); // And also for the short version of forever.
    
      cache.get("key"); // It can get them again,
      cache.remove("key"); // and remove it if you want.
    
      cache.get("unExistingKey"); // If something doesn't exists, it returns null
      cache.get("tooOldKey"); // The same if a key is too old
    
      cache.set("AnInteger", new Integer(42)); // You can save all kind of Objects...
      cache.set("ACollection", new ArrayList()); // ...whatever you want
    
      cache.removeAll(); // You can also clean it,
      cache.size(); // and ask it how many elements it has
    
  • tray --- (From grandcentrix & Tag is Caching) : a SharedPreferences replacement for Android with multiprocess support. [对系统的SharedPreferences添加多进程支持].

Tray is this mentioned explicit cross-process data management approach powered by a ContentProvider. Tray also provides an advanced API which makes it super easy to access and maintain your data with upgrade and migrate mechanisms. Welcome to SharedPreferences 2.0 aka Tray.

![](https://cloud.githubusercontent.com/assets/1096485/9990484/fe61888c-6061-11e5-890d-a76f1ef60304.png)

    // create a preference accessor. This is for global app preferences.
    final AppPreferences appPreferences = new AppPreferences(getContext()); // this Preference comes for free from the library
    // save a key value pair
    appPreferences.put("key", "lorem ipsum");

    // read the value for your key. the second parameter is a fallback (optional otherwise throws)
    final String value = appPreferences.getString("key", "default");
    Log.v(TAG, "value: " + value); // value: lorem ipsum

    // read a key that isn't saved. returns the default (or throws without default)
    final String defaultValue = appPreferences.getString("key2", "default");
    Log.v(TAG, "value: " + defaultValue); // value: default
  • Stanley --- (From iambmelt & Tag is Caching) : Convenient stashing of simple data formats on Android with SharedPreferences(A small library for study Annotation & Proxy). [使用注解&代理模式来操作SharedPreferences].

      //Define an interface        
      @Proxy(name = "Prefs", mode = Context.MODE_PRIVATE)
      public interface Person {
          @Accessor
          void setLastName(String name);
      }
    
      //Make an instance        
      Person elvis = new ProxyGenerator().create(context, Person.class);
    
      //And go!        
      elvis.setLastName("presley");
    
  • SharedSqlite --- (From Jhonnyc & Tag is Caching) : A Sqlite class library implementation of the android 'SharedPreferences' object. [一个用Sqlite构建的SharedPreferences类库].

      //To create a new instance simply call
      SharedSqlite.initialize(context);
    
      //Then you are free to add
      SharedSqlite.addValue(key, value);
    
      //Then get
      getStringValue(key, defaultValue)
      getIntValue(key, defaultValue)
      getLongValue(key, defaultValue)
      getDoubleValue(key, defaultValue)
      getFloatValue(key, defaultValue)
      getBooleanValue(key, defaultValue)
    
  • hawk --- (From orhanobut & Tag is Caching) : Secure Simple Key-Value Storage for Android & Support for RxJava. [安全简单的key-value存储].

      //Initialize the hawk
      Hawk.init(this)
          .setEncryptionMethod(HawkBuilder.EncryptionMethod.MEDIUM)
          .setStorage(HawkBuilder.newSqliteStorage(this))
          .setLogLevel(LogLevel.FULL)
          .build();
    
      //save
      Hawk.put(key, T); // Returns the result as boolean
    
      //get
      T result = Hawk.get(key);
    
  • Remember --- (From tumblr & Tag is Caching) : A preferences-backed key-value store. [tumblr出品的key-value存储,必属精品].

      //initialize Remember in  Application
      @Override
      public void onCreate() {
          super.onCreate();
          Remember.init(getApplicationContext(), "com.mysampleapp.whatever");
      }
    
      //Now you can freely use Remember from anywhere in your app:
      Remember.putString("some key", "some value");
      String value = Remember.getString("some key", "");
    
  • android-easy-cache --- (From vincentbrison & Tag is Caching) : This android library provide a cache with 2 layers, one in RAM in top of one disk. [两层缓存,一层是内存RAM一层是磁盘Disk].

      //A cache with default serializer in RAM and disk disable
      DualCache<AbstractVehicule> cache = new DualCacheBuilder<AbstractVehicule>(CACHE_NAME, TEST_APP_VERSION, AbstractVehicule.class)
              .useDefaultSerializerInRam(RAM_MAX_SIZE)
                     .noDisk();
    
      //To put an object into your cache, simply call put
      DummyClass object = new DummyClass();
       object = cache.put("mykey", object);
    
      //To get an object from your cache, simply call get
      DummyClass object = null;
       object = cache.get("mykey");
    

3.Architecture:

  • picasso --- (From square) : A powerful image downloading and caching library for Android. [图片加载框架,square出品,必属精品].

There are some libraries let picasso become stronger:

  • picasso-transformations --- (From wasabeef) : An Android transformation library providing a variety of image transformations for Picasso. [给picasso添加各种图像效果].

  • picasso-transformations --- (From TannerPerrien) : A transformation library for Picasso. [给picasso添加各种图像效果].

  • PicassoPalette --- (From florent37) : Android Lollipop Palette is now easy to use with Picasso. [picasso&Android L的采色板Palette].

  • CatKit --- (From cesarferreira) : Android kit for cat placeholders. [结合picasso实现图片的占位].

article

website

  • https://tinypng.com : Advanced lossy compression for PNG images that preserves full alpha transparency. [在线PNG压缩神器].

results matching ""

    No results matching ""