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


Java DefaultImageGetter类代码示例

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


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

示例1: RichTextConfigBuild

import com.zzhoujay.richtext.ig.DefaultImageGetter; //导入依赖的package包/类
RichTextConfigBuild(String source, int richType) {
    this.source = source;
    this.richType = richType;
    this.autoFix = true;
    this.resetSize = false;
    this.noImage = false;
    this.clickable = 0;
    this.cacheType = CacheType.ALL;
    this.imageGetter = new DefaultImageGetter();
    this.autoPlay = false;
    this.scaleType = ImageHolder.ScaleType.NONE;
    this.width = ImageHolder.WRAP_CONTENT;
    this.height = ImageHolder.WRAP_CONTENT;
    this.borderHolder = new ImageHolder.BorderHolder();
    this.singleLoad = true;
    this.useCache = true;
}
 
开发者ID:nichbar,项目名称:Aequorea,代码行数:18,代码来源:RichTextConfig.java

示例2: toggleModes

import com.zzhoujay.richtext.ig.DefaultImageGetter; //导入依赖的package包/类
private void toggleModes() {
    if(!isPreviewMode) {
        Toast.makeText(this, R.string.text_edit_mode, Toast.LENGTH_SHORT).show();
        editText.setText(original);
    } else {
        ImeAction.hideSoftKeyboard(this);
        Toast.makeText(this, R.string.text_preview_mode, Toast.LENGTH_SHORT).show();
        original = editText.getText().toString();

        RichTextConfig.RichTextConfigBuild builder = RichText
                .from(PatternMatcher.convertToStandardMarkdownEditor(original))
                .imageGetter(new DefaultImageGetter())
                .type(RichType.MARKDOWN);
        richText = builder.into(editText);
    }
    setIcon();
    isPreviewMode = !isPreviewMode;
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:19,代码来源:ComposerActivity.java

示例3: updateUI

import com.zzhoujay.richtext.ig.DefaultImageGetter; //导入依赖的package包/类
@Override
protected void updateUI() {
    mToolbar.setTitle(getString(R.string.text_reviewed_by, mReview.getUser().getDisplay_name()));
    RichTextConfig.RichTextConfigBuild builder = RichText
            .from(PatternMatcher.convertToStandardMarkdown(mReview.getTextRaw()))
            .imageGetter(new DefaultImageGetter())
            .type(RichType.MARKDOWN);
    mRichText = builder.into(reviewText);

    Glide.with(this).load(mReview.getUser()
            .getImage_url_med()).centerCrop()
            .diskCacheStrategy(DiskCacheStrategy.ALL)
            .into(avatar);

    SeriesSmall anime = mReview.getAnime();
    SeriesSmall manga = mReview.getManga();

    boolean isAnime = anime != null;

    switch (mPresenter.getApiPrefs().getTitleLanguage()) {
        case "romaji":
            reviewHeading.setText(isAnime? anime.getTitle_romaji() : manga.getTitle_romaji());
            break;
        case "english":
            reviewHeading.setText(isAnime? anime.getTitle_english() : manga.getTitle_english());
            break;
        case "japanese":
            reviewHeading.setText(isAnime? anime.getTitle_japanese() : manga.getTitle_japanese());
            break;
    }

    Glide.with(this).load(isAnime?anime.getImage_url_lge():manga.getImage_url_lge()).centerCrop()
            .diskCacheStrategy(DiskCacheStrategy.ALL)
            .into(reviewSeries);

    mPresenter.createSuperToast(this, getString(R.string.text_processing), R.drawable.ic_info_outline_white_18dp,
            Style.TYPE_PROGRESS_BAR, Style.DURATION_VERY_LONG,
            ContextCompat.getColor(this, R.color.colorStateBlue));
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:40,代码来源:ReviewReaderActivity.java


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