當前位置: 首頁>>代碼示例>>Java>>正文


Java OnImageClickListener類代碼示例

本文整理匯總了Java中com.zzhoujay.richtext.callback.OnImageClickListener的典型用法代碼示例。如果您正苦於以下問題:Java OnImageClickListener類的具體用法?Java OnImageClickListener怎麽用?Java OnImageClickListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OnImageClickListener類屬於com.zzhoujay.richtext.callback包,在下文中一共展示了OnImageClickListener類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ClickableImageSpan

import com.zzhoujay.richtext.callback.OnImageClickListener; //導入依賴的package包/類
public ClickableImageSpan(Drawable drawable, ClickableImageSpan clickableImageSpan, OnImageClickListener onImageClickListener, OnImageLongClickListener onImageLongClickListener) {
    super(drawable, clickableImageSpan.getSource());
    this.imageUrls = clickableImageSpan.imageUrls;
    this.position = clickableImageSpan.position;
    this.onImageClickListenerWeakReference = new WeakReference<>(onImageClickListener);
    this.onImageLongClickListenerWeakReference = new WeakReference<>(onImageLongClickListener);
}
 
開發者ID:nichbar,項目名稱:Aequorea,代碼行數:8,代碼來源:ClickableImageSpan.java

示例2: onClick

import com.zzhoujay.richtext.callback.OnImageClickListener; //導入依賴的package包/類
@Override
public void onClick(View widget) {
    OnImageClickListener onImageClickListener = onImageClickListenerWeakReference.get();
    if (onImageClickListener != null) {
        boolean isDefaultDrawable = false;
        
        Drawable drawable;
        if (getDrawable() instanceof DrawableWrapper) {
            drawable = ((DrawableWrapper) getDrawable()).getDrawable();
            isDefaultDrawable = drawable instanceof ColorDrawable;
        }
        onImageClickListener.imageClicked(imageUrls, position, isDefaultDrawable);
    }
}
 
開發者ID:nichbar,項目名稱:Aequorea,代碼行數:15,代碼來源:ClickableImageSpan.java

示例3: RichTextConfig

import com.zzhoujay.richtext.callback.OnImageClickListener; //導入依賴的package包/類
private RichTextConfig(String source, int richType, boolean autoFix, boolean resetSize, @CacheType int cacheType,
                       ImageFixCallback imageFixCallback, LinkFixCallback linkFixCallback, boolean noImage,
                       int clickable, OnImageClickListener onImageClickListener, OnUrlClickListener onUrlClickListener,
                       OnImageLongClickListener onImageLongClickListener, OnUrlLongClickListener onUrlLongClickListener,
                       Drawable placeHolder, Drawable errorImage, ImageGetter imageGetter, Callback callback,
                       boolean autoPlay, @ImageHolder.ScaleType int scaleType, int width, int height,
                       ImageHolder.BorderHolder borderHolder, boolean singleLoad, boolean useCache) {
    this.source = source;
    this.richType = richType;
    this.autoFix = autoFix;
    this.resetSize = resetSize;
    this.imageFixCallback = imageFixCallback;
    this.linkFixCallback = linkFixCallback;
    this.noImage = noImage;
    this.cacheType = cacheType;
    this.onImageClickListener = onImageClickListener;
    this.onUrlClickListener = onUrlClickListener;
    this.onImageLongClickListener = onImageLongClickListener;
    this.onUrlLongClickListener = onUrlLongClickListener;
    this.placeHolder = placeHolder;
    this.errorImage = errorImage;
    this.imageGetter = imageGetter;
    this.callback = callback;
    this.scaleType = scaleType;
    this.autoPlay = autoPlay;
    this.width = width;
    this.height = height;
    this.borderHolder = borderHolder;
    this.singleLoad = singleLoad;
    if (clickable == 0) {
        if (onImageLongClickListener != null || onUrlLongClickListener != null ||
                onImageClickListener != null || onUrlClickListener != null) {
            clickable = 1;
        }
    }
    this.clickable = clickable;
    this.useCache = useCache;
}
 
開發者ID:nichbar,項目名稱:Aequorea,代碼行數:39,代碼來源:RichTextConfig.java

示例4: ClickableImageSpan

import com.zzhoujay.richtext.callback.OnImageClickListener; //導入依賴的package包/類
public ClickableImageSpan(Drawable drawable, ClickableImageSpan clickableImageSpan, OnImageClickListener onImageClickListener, OnImageLongClickListener onImageLongClickListener) {
    super(drawable, clickableImageSpan.getSource());
    this.imageUrls = clickableImageSpan.imageUrls;
    this.position = clickableImageSpan.position;
    this.onImageClickListener = onImageClickListener;
    this.onImageLongClickListener = onImageLongClickListener;
}
 
開發者ID:zzhoujay,項目名稱:RichText,代碼行數:8,代碼來源:ClickableImageSpan.java

示例5: RichTextConfig

import com.zzhoujay.richtext.callback.OnImageClickListener; //導入依賴的package包/類
private RichTextConfig(String source, RichType richType, boolean autoFix, boolean resetSize, CacheType cacheType,
                       ImageFixCallback imageFixCallback, LinkFixCallback linkFixCallback, boolean noImage,
                       int clickable, OnImageClickListener onImageClickListener, OnUrlClickListener onUrlClickListener,
                       OnImageLongClickListener onImageLongClickListener, OnUrlLongClickListener onUrlLongClickListener,
                       ImageGetter imageGetter, Callback callback, boolean autoPlay, ImageHolder.ScaleType scaleType,
                       int width, int height, DrawableBorderHolder borderHolder, boolean singleLoad,
                       ImageDownloader imageDownloader, DrawableGetter placeHolderDrawableGetter, DrawableGetter errorImageDrawableGetter) {
    this.source = source;
    this.richType = richType;
    this.autoFix = autoFix;
    this.resetSize = resetSize;
    this.imageFixCallback = imageFixCallback;
    this.linkFixCallback = linkFixCallback;
    this.noImage = noImage;
    this.cacheType = cacheType;
    this.onImageClickListener = onImageClickListener;
    this.onUrlClickListener = onUrlClickListener;
    this.onImageLongClickListener = onImageLongClickListener;
    this.onUrlLongClickListener = onUrlLongClickListener;
    this.imageGetter = imageGetter;
    this.callback = callback;
    this.scaleType = scaleType;
    this.autoPlay = autoPlay;
    this.width = width;
    this.height = height;
    this.borderHolder = borderHolder;
    this.singleLoad = singleLoad;
    this.imageDownloader = imageDownloader;
    this.placeHolderDrawableGetter = placeHolderDrawableGetter;
    this.errorImageDrawableGetter = errorImageDrawableGetter;
    if (clickable == 0) {
        if (onImageLongClickListener != null || onUrlLongClickListener != null ||
                onImageClickListener != null || onUrlClickListener != null) {
            clickable = 1;
        }
    }
    this.clickable = clickable;

    argsPool = new HashMap<>();
}
 
開發者ID:zzhoujay,項目名稱:RichText,代碼行數:41,代碼來源:RichTextConfig.java

示例6: imageClick

import com.zzhoujay.richtext.callback.OnImageClickListener; //導入依賴的package包/類
/**
 * 圖片點擊回調
 *
 * @param imageClickListener 回調
 * @return RichTextConfigBuild
 */
public RichTextConfigBuild imageClick(OnImageClickListener imageClickListener) {
    this.onImageClickListener = imageClickListener;
    return this;
}
 
開發者ID:nichbar,項目名稱:Aequorea,代碼行數:11,代碼來源:RichTextConfig.java


注:本文中的com.zzhoujay.richtext.callback.OnImageClickListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。