當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。