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


Java DraweeView.getContext方法代码示例

本文整理汇总了Java中com.facebook.drawee.view.DraweeView.getContext方法的典型用法代码示例。如果您正苦于以下问题:Java DraweeView.getContext方法的具体用法?Java DraweeView.getContext怎么用?Java DraweeView.getContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.drawee.view.DraweeView的用法示例。


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

示例1: Attacher

import com.facebook.drawee.view.DraweeView; //导入方法依赖的package包/类
public Attacher(DraweeView<GenericDraweeHierarchy> draweeView) {
    mDraweeView = new WeakReference<>(draweeView);
    draweeView.getHierarchy().setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER);
    draweeView.setOnTouchListener(this);
    mScaleDragDetector = new ScaleDragDetector(draweeView.getContext(), this);
    mGestureDetector = new GestureDetectorCompat(draweeView.getContext(),
            new GestureDetector.SimpleOnGestureListener() {
                @Override public void onLongPress(MotionEvent e) {
                    super.onLongPress(e);
                    if (null != mLongClickListener) {
                        mLongClickListener.onLongClick(getDraweeView());
                    }
                }
            });
    mGestureDetector.setOnDoubleTapListener(new DefaultOnDoubleTapListener(this));
}
 
开发者ID:lanyuanxiaoyao,项目名称:PicKing,代码行数:17,代码来源:Attacher.java

示例2: Attacher

import com.facebook.drawee.view.DraweeView; //导入方法依赖的package包/类
public Attacher(DraweeView<GenericDraweeHierarchy> draweeView) {
    mDraweeView = new WeakReference<>(draweeView);
    draweeView.getHierarchy().setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER);
    draweeView.setOnTouchListener(this);
    mScaleDragDetector = new ScaleDragDetector(draweeView.getContext(), this);
    mGestureDetector = new GestureDetectorCompat(draweeView.getContext(),
            new GestureDetector.SimpleOnGestureListener() {
                @Override
                public void onLongPress(MotionEvent e) {
                    super.onLongPress(e);
                    if (null != mLongClickListener) {
                        mLongClickListener.onLongClick(getDraweeView());
                    }
                }
            });
    mGestureDetector.setOnDoubleTapListener(new DefaultOnDoubleTapListener(this));
}
 
开发者ID:gzsll,项目名称:TLint,代码行数:18,代码来源:Attacher.java

示例3: onFling

import com.facebook.drawee.view.DraweeView; //导入方法依赖的package包/类
@Override public void onFling(float startX, float startY, float velocityX, float velocityY) {
    DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();
    if (draweeView == null) {
        return;
    }

    mCurrentFlingRunnable = new FlingRunnable(draweeView.getContext());
    mCurrentFlingRunnable.fling(getViewWidth(), getViewHeight(), (int) velocityX,
            (int) velocityY);
    draweeView.post(mCurrentFlingRunnable);
}
 
开发者ID:lanyuanxiaoyao,项目名称:PicKing,代码行数:12,代码来源:Attacher.java

示例4: onFling

import com.facebook.drawee.view.DraweeView; //导入方法依赖的package包/类
@Override
public void onFling(float startX, float startY, float velocityX, float velocityY) {
    DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();
    if (draweeView == null) {
        return;
    }

    mCurrentFlingRunnable = new FlingRunnable(draweeView.getContext());
    mCurrentFlingRunnable.fling(getViewWidth(), getViewHeight(), (int) velocityX, (int) velocityY);
    draweeView.post(mCurrentFlingRunnable);
}
 
开发者ID:gzsll,项目名称:TLint,代码行数:12,代码来源:Attacher.java


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