Search in sources :

Example 1 with GlideImageLoader

use of com.lzy.demo.utils.GlideImageLoader in project okhttp-OkGo by jeasonlzy.

the class RxFormUploadActivity method selectImage.

@OnClick(R.id.selectImage)
public void selectImage(View view) {
    ImagePicker imagePicker = ImagePicker.getInstance();
    imagePicker.setImageLoader(new GlideImageLoader());
    //多选
    imagePicker.setMultiMode(true);
    //显示拍照按钮
    imagePicker.setShowCamera(true);
    //最多选择9张
    imagePicker.setSelectLimit(9);
    //不进行裁剪
    imagePicker.setCrop(false);
    Intent intent = new Intent(this, ImageGridActivity.class);
    startActivityForResult(intent, 100);
}
Also used : Intent(android.content.Intent) ImagePicker(com.lzy.imagepicker.ImagePicker) GlideImageLoader(com.lzy.demo.utils.GlideImageLoader) OnClick(butterknife.OnClick)

Example 2 with GlideImageLoader

use of com.lzy.demo.utils.GlideImageLoader in project okhttp-OkGo by jeasonlzy.

the class CacheDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_cache_demo);
    initToolBar(toolbar, true, "强大的缓存");
    NineGridView.setImageLoader(new GlideImageLoader());
    ArrayList<NewsTabFragment> fragments = new ArrayList<>();
    NewsTabFragment fragment1 = NewsTabFragment.newInstance();
    fragment1.setTitle("国内最新");
    fragments.add(fragment1);
    NewsTabFragment fragment2 = NewsTabFragment.newInstance();
    fragment2.setTitle("游戏焦点");
    fragments.add(fragment2);
    NewsTabFragment fragment3 = NewsTabFragment.newInstance();
    fragment3.setTitle("娱乐焦点");
    fragments.add(fragment3);
    MyPagerAdapter adapter = new MyPagerAdapter(getSupportFragmentManager(), fragments);
    viewPager.setAdapter(adapter);
    viewPager.setOffscreenPageLimit(fragments.size());
    tab.setupWithViewPager(viewPager);
}
Also used : ArrayList(java.util.ArrayList) GlideImageLoader(com.lzy.demo.utils.GlideImageLoader)

Example 3 with GlideImageLoader

use of com.lzy.demo.utils.GlideImageLoader in project okhttp-OkGo by jeasonlzy.

the class UploadActivity method select.

@OnClick(R.id.select)
public void select(View view) {
    imagePicker = ImagePicker.getInstance();
    imagePicker.setImageLoader(new GlideImageLoader());
    imagePicker.setShowCamera(true);
    imagePicker.setSelectLimit(9);
    imagePicker.setCrop(false);
    Intent intent = new Intent(getApplicationContext(), ImageGridActivity.class);
    startActivityForResult(intent, 100);
}
Also used : Intent(android.content.Intent) GlideImageLoader(com.lzy.demo.utils.GlideImageLoader) OnClick(butterknife.OnClick)

Example 4 with GlideImageLoader

use of com.lzy.demo.utils.GlideImageLoader in project okhttp-OkGo by jeasonlzy.

the class FormUploadActivity method selectImage.

@OnClick(R.id.selectImage)
public void selectImage(View view) {
    ImagePicker imagePicker = ImagePicker.getInstance();
    imagePicker.setImageLoader(new GlideImageLoader());
    //多选
    imagePicker.setMultiMode(true);
    //显示拍照按钮
    imagePicker.setShowCamera(true);
    //最多选择9张
    imagePicker.setSelectLimit(9);
    //不进行裁剪
    imagePicker.setCrop(false);
    Intent intent = new Intent(this, ImageGridActivity.class);
    startActivityForResult(intent, 100);
}
Also used : Intent(android.content.Intent) ImagePicker(com.lzy.imagepicker.ImagePicker) GlideImageLoader(com.lzy.demo.utils.GlideImageLoader) OnClick(butterknife.OnClick)

Aggregations

GlideImageLoader (com.lzy.demo.utils.GlideImageLoader)4 Intent (android.content.Intent)3 OnClick (butterknife.OnClick)3 ImagePicker (com.lzy.imagepicker.ImagePicker)2 ArrayList (java.util.ArrayList)1