Java Code Examples for com.facebook.drawee.view.DraweeView#getContext()
The following examples show how to use
com.facebook.drawee.view.DraweeView#getContext() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Attacher.java From PicKing with Apache License 2.0 | 6 votes |
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)); }
Example 2
Source File: Attacher.java From CanPhotos with Apache License 2.0 | 6 votes |
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)); }
Example 3
Source File: Attacher.java From SprintNBA with Apache License 2.0 | 6 votes |
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)); }
Example 4
Source File: Attacher.java From PhotoDraweeView with Apache License 2.0 | 6 votes |
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)); }
Example 5
Source File: Attacher.java From TLint with Apache License 2.0 | 6 votes |
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)); }
Example 6
Source File: Attacher.java From PicKing with Apache License 2.0 | 5 votes |
@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); }
Example 7
Source File: Attacher.java From CanPhotos with Apache License 2.0 | 5 votes |
@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); }
Example 8
Source File: Attacher.java From SprintNBA with Apache License 2.0 | 5 votes |
@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); }
Example 9
Source File: Attacher.java From PhotoDraweeView with Apache License 2.0 | 5 votes |
@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); }
Example 10
Source File: Attacher.java From TLint with Apache License 2.0 | 5 votes |
@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); }