当前位置: 首页>>代码示例>>Java>>正文


Java GlideEngine类代码示例

本文整理汇总了Java中com.zhihu.matisse.engine.impl.GlideEngine的典型用法代码示例。如果您正苦于以下问题:Java GlideEngine类的具体用法?Java GlideEngine怎么用?Java GlideEngine使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GlideEngine类属于com.zhihu.matisse.engine.impl包,在下文中一共展示了GlideEngine类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reset

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
private void reset() {
    mimeTypeSet = null;
    mediaTypeExclusive = true;
    showSingleMediaType = false;
    themeId = R.style.Matisse_Zhihu;
    orientation = 0;
    countable = false;
    maxSelectable = 1;
    maxImageSelectable = 0;
    maxVideoSelectable = 0;
    filters = null;
    capture = false;
    captureStrategy = null;
    spanCount = 3;
    gridExpectedSize = 0;
    thumbnailScale = 0.5f;
    imageEngine = new GlideEngine();
}
 
开发者ID:sathishmscict,项目名称:Matisse-Image-and-Video-Selector,代码行数:19,代码来源:SelectionSpec.java

示例2: matisse

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
private void matisse() {
    Matisse.from(this)
            .choose(MimeType.ofAll(), false)
            .theme(R.style.Matisse_Zhihu)
            .countable(true)
            .capture(true)
            .captureStrategy(new CaptureStrategy(true, "com.zhihu.matisse.sample.fileprovider"))
            .maxSelectable(9)
            .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))
            .gridExpectedSize(getResources().getDimensionPixelSize(R.dimen.grid_expected_size))
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
            .thumbnailScale(0.85f)
            .imageEngine(new GlideEngine())
            .forResult(REQUEST_CODE_CHOOSE);
}
 
开发者ID:Jusenr,项目名称:RX_Demo,代码行数:16,代码来源:MainActivity.java

示例3: doSomething

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
private void doSomething() {
    Matisse.from(MainActivity.this)
            .choose(MimeType.allOf())
            .countable(true)
            .maxSelectable(2000)
            .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))
            .gridExpectedSize(getResources().getDimensionPixelSize(R.dimen.grid_expected_size))
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
            .thumbnailScale(0.85f)
            .imageEngine(new GlideEngine())
            .forResult(REQUEST_CODE_CHOOSE);
}
 
开发者ID:hiliving,项目名称:P2Video-master,代码行数:13,代码来源:MainActivity.java

示例4: selectImages

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
@Override
public void selectImages() {
    Matisse.from(this)
            .choose(MimeType.of(MimeType.JPEG, MimeType.PNG))
            .countable(true)
            .maxSelectable(4 - uriList.size())
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
            .thumbnailScale(0.80f)
            .imageEngine(new GlideEngine())
            .forResult(REQUEST_CODE_CHOOSE);
}
 
开发者ID:NICOLITE,项目名称:HutHelper,代码行数:12,代码来源:CreateLostAndFoundActivity.java

示例5: changeAvatar

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
@Override
public void changeAvatar() {
    Matisse.from(this)
            .choose(MimeType.of(MimeType.JPEG, MimeType.PNG))
            .countable(true)
            .maxSelectable(1)
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
            .thumbnailScale(0.85f)
            .imageEngine(new GlideEngine())
            .forResult(REQUEST_CODE_CHOOSE);
}
 
开发者ID:NICOLITE,项目名称:HutHelper,代码行数:12,代码来源:UserInfoActivity.java

示例6: toGallery

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
private void toGallery() {
    Matisse.from(PubDynamicActivity.this)
            .choose(MimeType.allOf())
            .countable(true)
            .maxSelectable(9)
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
            .thumbnailScale(0.85f)
            .imageEngine(new GlideEngine())
            .forResult(REQUEST_CODE_CHOOSE);
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:11,代码来源:PubDynamicActivity.java

示例7: openAlbum

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
private void openAlbum() {
    Matisse.from(this)
            .choose(MimeType.allOf())
            .countable(true)
            .maxSelectable(5)
            .thumbnailScale(0.5f)
            .imageEngine(new GlideEngine())
            .theme(R.style.Matisse_Dracula)
            .forResult(REQUEST_CODE_ALBUM);
}
 
开发者ID:Dobbbby,项目名称:Mediator,代码行数:11,代码来源:MainActivity.java

示例8: upImg

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
private void upImg() {
    mTranslateBtn.setOnClickListener(v -> Matisse.from(TranslateActivity.this)
            .choose(MimeType.allOf())
            .countable(true)
            .maxSelectable(1)
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
            .thumbnailScale(0.85f)
            .imageEngine(new GlideEngine())
            .forResult(REQUEST_CODE_CHOOSE));
}
 
开发者ID:sdwfqin,项目名称:AndroidSamples,代码行数:11,代码来源:TranslateActivity.java

示例9: showImageSelector

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
protected void showImageSelector() {
    mContentPosition = mEtContent.getSelectionStart();

    Matisse.from(PostFragment.this)
            .choose(MimeType.ofImage())
            .countable(true)
            .maxSelectable(9)
            .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
            .thumbnailScale(0.85f)
            .imageEngine(new GlideEngine())
            .theme(HiSettingsHelper.getInstance().getImageActivityTheme(getActivity()))
            .capture(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED)
            .captureStrategy(new CaptureStrategy(false, BuildConfig.APPLICATION_ID + ".provider"))
            .forResult(SELECT_PICTURE);
}
 
开发者ID:GreenSkinMonster,项目名称:hipda,代码行数:16,代码来源:PostFragment.java

示例10: onClick

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
@Override
public void onClick(final View v) {
    RxPermissions rxPermissions = new RxPermissions(this);
    rxPermissions.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
            .subscribe(new Observer<Boolean>() {
                @Override
                public void onSubscribe(Disposable d) {

                }

                @Override
                public void onNext(Boolean aBoolean) {
                    if (aBoolean) {
                        switch (v.getId()) {
                            case R.id.zhihu:
                                Matisse.from(SampleActivity.this)
                                        .choose(MimeType.ofAll(), false)
                                        .countable(true)
                                        .capture(true)
                                        .captureStrategy(
                                                new CaptureStrategy(true, "com.zhihu.matisse.sample.fileprovider"))
                                        .maxSelectable(9)
                                        .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))
                                        .gridExpectedSize(
                                                getResources().getDimensionPixelSize(R.dimen.grid_expected_size))
                                        .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
                                        .thumbnailScale(0.85f)
                                        .imageEngine(new GlideEngine())
                                        .forResult(REQUEST_CODE_CHOOSE);
                                break;
                            case R.id.dracula:
                                Matisse.from(SampleActivity.this)
                                        .choose(MimeType.ofImage())
                                        .theme(R.style.Matisse_Dracula)
                                        .countable(false)
                                        .maxSelectable(9)
                                        .imageEngine(new PicassoEngine())
                                        .forResult(REQUEST_CODE_CHOOSE);
                                break;
                        }
                        mAdapter.setData(null, null);
                    } else {
                        Toast.makeText(SampleActivity.this, R.string.permission_request_denied, Toast.LENGTH_LONG)
                                .show();
                    }
                }

                @Override
                public void onError(Throwable e) {

                }

                @Override
                public void onComplete() {

                }
            });
}
 
开发者ID:sathishmscict,项目名称:Matisse-Image-and-Video-Selector,代码行数:59,代码来源:SampleActivity.java

示例11: init

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
@Override
protected void init(Bundle savedInstanceState) {
    setTitle(getString(R.string.str_contribute_img_list));
    setTopLeftButton(R.drawable.ic_return_white_24dp, new OnClickListener() {
        @Override
        public void onClick() {
            finish();
        }
    });

    setTopRightButton(getString(R.string.str_contribute_img), new OnClickListener() {
        @Override
        public void onClick() {
            //打开图片选择器
            Matisse.from(ContributeImgActivity.this)
                    .choose(MimeType.of(MimeType.JPEG, MimeType.PNG, MimeType.GIF))
                    .countable(true)
                    .theme(R.style.Matisse_Dracula)
                    .maxSelectable(Constant.MAX_NUM_OF_CONTRIBUTED_IMG_EACH_TIME)
                    .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
                    .thumbnailScale(0.85f)
                    .imageEngine(new GlideEngine())
                    .forResult(REQUEST_CODE_CHOOSE_IMG);
            ;
        }
    });

    //上拉刷新和下拉加载监听
    mContributeImgPulltorefreshLayout.setRefreshListener(new BaseRefreshListener() {
        @Override
        public void refresh() {
            mContributeImgPresenter.getContributeImgList(mDefaultStart + "", ApiConfig.DEAULT_NUM_PER_PAGE + "");
        }

        @Override
        public void loadMore() {
            mContributeImgPresenter.getContributeImgList((mContributeImgList.size() + 1) + "", ApiConfig.DEAULT_NUM_PER_PAGE + "");
        }
    });
    mContributeImgPresenter = new ContributeImgPresenter(this, this);
    //加载当前贡献图片的列表
    mContributeImgPresenter.getContributeImgList(mDefaultStart + "", ApiConfig.DEAULT_NUM_PER_PAGE + "");
}
 
开发者ID:codekongs,项目名称:ImageClassify,代码行数:44,代码来源:ContributeImgActivity.java

示例12: onClick

import com.zhihu.matisse.engine.impl.GlideEngine; //导入依赖的package包/类
@Override
public void onClick(final View v) {
    RxPermissions rxPermissions = new RxPermissions(this);
    rxPermissions.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
            .subscribe(new Observer<Boolean>() {
                @Override
                public void onSubscribe(Disposable d) {

                }

                @Override
                public void onNext(Boolean aBoolean) {
                    if (aBoolean) {
                        switch (v.getId()) {
                            case R.id.zhihu:
                                Matisse.from(MatisseDemoActivity.this)
                                        .choose(MimeType.ofAll(), false)
                                        .countable(true)
                                        .capture(true)
                                        .captureStrategy(
                                                new CaptureStrategy(true, getPackageName() + ".fileprovider"))
                                        .maxSelectable(9)
                                        .addFilter(new GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))
                                        .gridExpectedSize(
                                                getResources().getDimensionPixelSize(R.dimen.grid_expected_size))
                                        .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
                                        .thumbnailScale(0.85f)
                                        .imageEngine(new GlideEngine())
                                        .forResult(REQUEST_CODE_CHOOSE);
                                break;
                            case R.id.dracula:
                                Matisse.from(MatisseDemoActivity.this)
                                        .choose(MimeType.of(MimeType.JPEG,MimeType.PNG))
                                        .theme(R.style.Matisse_Dracula)
                                        .countable(false)
                                        .maxSelectable(1)
                                        .imageEngine(new PicassoEngine())
                                        .forResult(REQUEST_CODE_CHOOSE);
                                break;
                            case R.id.custom:
                                Matisse.from(MatisseDemoActivity.this)
                                        .choose(MimeType.ofImage())
                                        .forResult(REQUEST_CODE_CHOOSE);
                                break;
                            default:
                                break;
                        }
                    } else {
                        Toast.makeText(MatisseDemoActivity.this, R.string.permission_request_denied, Toast.LENGTH_LONG)
                                .show();
                    }
                }

                @Override
                public void onError(Throwable e) {

                }

                @Override
                public void onComplete() {

                }
            });
}
 
开发者ID:REBOOTERS,项目名称:AndroidAnimationExercise,代码行数:65,代码来源:MatisseDemoActivity.java


注:本文中的com.zhihu.matisse.engine.impl.GlideEngine类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。