Search in sources :

Example 1 with BoxingFrescoLoader

use of com.bilibili.boxing.impl.BoxingFrescoLoader in project boxing by Bilibili.

the class MainActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    IBoxingMediaLoader loader;
    switch(id) {
        case R.id.menu_fresco:
            loader = new BoxingFrescoLoader(this);
            break;
        case R.id.menu_glide:
            loader = new BoxingGlideLoader();
            break;
        case R.id.menu_picasso:
            loader = new BoxingPicassoLoader();
            break;
        default:
            loader = new BoxingFrescoLoader(this);
            break;
    }
    BoxingMediaLoader.getInstance().init(loader);
    return super.onOptionsItemSelected(item);
}
Also used : BoxingGlideLoader(com.bilibili.boxing.impl.BoxingGlideLoader) BoxingPicassoLoader(com.bilibili.boxing.impl.BoxingPicassoLoader) BoxingFrescoLoader(com.bilibili.boxing.impl.BoxingFrescoLoader) IBoxingMediaLoader(com.bilibili.boxing.loader.IBoxingMediaLoader)

Example 2 with BoxingFrescoLoader

use of com.bilibili.boxing.impl.BoxingFrescoLoader in project boxing by Bilibili.

the class BoxingApplication method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    IBoxingMediaLoader loader = new BoxingFrescoLoader(this);
    BoxingMediaLoader.getInstance().init(loader);
    BoxingCrop.getInstance().init(new BoxingUcrop());
}
Also used : BoxingUcrop(com.bilibili.boxing.impl.BoxingUcrop) BoxingFrescoLoader(com.bilibili.boxing.impl.BoxingFrescoLoader) IBoxingMediaLoader(com.bilibili.boxing.loader.IBoxingMediaLoader)

Aggregations

BoxingFrescoLoader (com.bilibili.boxing.impl.BoxingFrescoLoader)2 IBoxingMediaLoader (com.bilibili.boxing.loader.IBoxingMediaLoader)2 BoxingGlideLoader (com.bilibili.boxing.impl.BoxingGlideLoader)1 BoxingPicassoLoader (com.bilibili.boxing.impl.BoxingPicassoLoader)1 BoxingUcrop (com.bilibili.boxing.impl.BoxingUcrop)1