本文整理汇总了Java中uk.co.senab.photoview.log.LogManager类的典型用法代码示例。如果您正苦于以下问题:Java LogManager类的具体用法?Java LogManager怎么用?Java LogManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LogManager类属于uk.co.senab.photoview.log包,在下文中一共展示了LogManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDrag
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
public void onDrag(float dx, float dy) {
if (!this.mScaleDragDetector.isScaling()) {
if (DEBUG) {
LogManager.getLogger().d(LOG_TAG, String.format("onDrag: dx: %.2f. dy: %.2f", new Object[]{Float.valueOf(dx), Float.valueOf(dy)}));
}
ImageView imageView = getImageView();
this.mSuppMatrix.postTranslate(dx, dy);
checkAndDisplayMatrix();
ViewParent parent = imageView.getParent();
if (!this.mAllowParentInterceptOnEdge || this.mScaleDragDetector.isScaling()) {
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(true);
}
} else if ((this.mScrollEdge == 2 || ((this.mScrollEdge == 0 && dx >= 1.0f) || (this.mScrollEdge == 1 && dx <= -1.0f))) && parent != null) {
parent.requestDisallowInterceptTouchEvent(false);
}
}
}
示例2: getImageView
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
public ImageView getImageView() {
ImageView imageView = null;
if (null != mImageView) {
imageView = mImageView.get();
}
// If we don't have an ImageView, call cleanup()
if (null == imageView) {
cleanup();
LogManager.getLogger().i(LOG_TAG,
"ImageView no longer exists. You should not use this PhotoViewAttacher any more.");
}
return imageView;
}
示例3: onDrag
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void onDrag(float dx, float dy) {
if (mScaleDragDetector.isScaling()) {
return; // Do not drag if we are already scaling
}
if (DEBUG) {
LogManager.getLogger().d(LOG_TAG,
String.format("onDrag: dx: %.2f. dy: %.2f", dx, dy));
}
ImageView imageView = getImageView();
mSuppMatrix.postTranslate(dx, dy);
checkAndDisplayMatrix();
/**
* Here we decide whether to let the ImageView's parent to start taking
* over the touch event.
*
* First we check whether this function is enabled. We never want the
* parent to take over if we're scaling. We then check the edge we're
* on, and the direction of the scroll (i.e. if we're pulling against
* the edge, aka 'overscrolling', let the parent take over).
*/
ViewParent parent = imageView.getParent();
if (mAllowParentInterceptOnEdge && !mScaleDragDetector.isScaling() && !mBlockParentIntercept) {
if (mScrollEdge == EDGE_BOTH
|| (mScrollEdge == EDGE_LEFT && dx >= 1f)
|| (mScrollEdge == EDGE_RIGHT && dx <= -1f)) {
if (null != parent) {
parent.requestDisallowInterceptTouchEvent(false);
}
}
} else {
if (null != parent) {
parent.requestDisallowInterceptTouchEvent(true);
}
}
}
示例4: onScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void onScale(float scaleFactor, float focusX, float focusY) {
if (DEBUG) {
LogManager.getLogger().d(
LOG_TAG,
String.format("onScale: scale: %.2f. fX: %.2f. fY: %.2f",
scaleFactor, focusX, focusY));
}
if ((getScale() < mMaxScale || scaleFactor < 1f) && (getScale() > mMinScale || scaleFactor > 1f)) {
if (null != mScaleChangeListener) {
mScaleChangeListener.onScaleChange(scaleFactor, focusX, focusY);
}
mSuppMatrix.postScale(scaleFactor, scaleFactor, focusX, focusY);
checkAndDisplayMatrix();
}
}
示例5: setScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void setScale(float scale, float focalX, float focalY,
boolean animate) {
ImageView imageView = getImageView();
if (null != imageView) {
// Check to see if the scale is within bounds
if (scale < mMinScale || scale > mMaxScale) {
LogManager
.getLogger()
.i(LOG_TAG,
"Scale must be within the range of minScale and maxScale");
return;
}
if (animate) {
imageView.post(new AnimatedZoomRunnable(getScale(), scale,
focalX, focalY));
} else {
mSuppMatrix.setScale(scale, scale, focalX, focalY);
checkAndDisplayMatrix();
}
}
}
示例6: onFling
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void onFling(float startX, float startY, float velocityX,
float velocityY) {
if (DEBUG) {
LogManager.getLogger().d(
LOG_TAG,
"onFling. sX: " + startX + " sY: " + startY + " Vx: "
+ velocityX + " Vy: " + velocityY);
}
ImageView imageView = getImageView();
mCurrentFlingRunnable = new FlingRunnable(imageView.getContext());
mCurrentFlingRunnable.fling(getImageViewWidth(imageView),
getImageViewHeight(imageView), (int) velocityX, (int) velocityY);
imageView.post(mCurrentFlingRunnable);
}
示例7: run
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
public void run() {
if (!this.mScroller.isFinished()) {
ImageView imageView = this.this$0.getImageView();
if (imageView != null && this.mScroller.computeScrollOffset()) {
int newX = this.mScroller.getCurrX();
int newY = this.mScroller.getCurrY();
if (PhotoViewAttacher.access$300()) {
LogManager.getLogger().d("PhotoViewAttacher", "fling run(). CurrentX:" + this.mCurrentX + " CurrentY:" + this.mCurrentY + " NewX:" + newX + " NewY:" + newY);
}
PhotoViewAttacher.access$100(this.this$0).postTranslate((float) (this.mCurrentX - newX), (float) (this.mCurrentY - newY));
PhotoViewAttacher.access$400(this.this$0, this.this$0.getDrawMatrix());
this.mCurrentX = newX;
this.mCurrentY = newY;
Compat.postOnAnimation(imageView, this);
}
}
}
示例8: onFling
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
public void onFling(float startX, float startY, float velocityX, float velocityY) {
if (DEBUG) {
LogManager.getLogger().d(LOG_TAG, "onFling. sX: " + startX + " sY: " + startY + " Vx: " + velocityX + " Vy: " + velocityY);
}
ImageView imageView = getImageView();
this.mCurrentFlingRunnable = new FlingRunnable(this, imageView.getContext());
this.mCurrentFlingRunnable.fling(getImageViewWidth(imageView), getImageViewHeight(imageView), (int) velocityX, (int) velocityY);
imageView.post(this.mCurrentFlingRunnable);
}
示例9: setScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
public void setScale(float scale, float focalX, float focalY, boolean animate) {
ImageView imageView = getImageView();
if (imageView == null) {
return;
}
if (scale < this.mMinScale || scale > this.mMaxScale) {
LogManager.getLogger().i(LOG_TAG, "Scale must be within the range of minScale and maxScale");
} else if (animate) {
imageView.post(new AnimatedZoomRunnable(this, getScale(), scale, focalX, focalY));
} else {
this.mSuppMatrix.setScale(scale, scale, focalX, focalY);
checkAndDisplayMatrix();
}
}
示例10: onScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void onScale(float scaleFactor, float focusX, float focusY) {
if (DEBUG) {
LogManager.getLogger().d(
LOG_TAG,
String.format("onScale: scale: %.2f. fX: %.2f. fY: %.2f",
scaleFactor, focusX, focusY));
}
if (getScale() < mMaxScale || scaleFactor < 1f) {
if (null != mScaleChangeListener) {
mScaleChangeListener.onScaleChange(scaleFactor, focusX, focusY);
}
mSuppMatrix.postScale(scaleFactor, scaleFactor, focusX, focusY);
checkAndDisplayMatrix();
}
}
示例11: getImageView
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
public ImageView getImageView() {
ImageView imageView = null;
if (null != mImageView) {
imageView = mImageView.get();
}
// If we don't have an ImageView, call cleanup()
if (null == imageView) {
cleanup();
LogManager.getLogger().i(LOG_TAG,
"ImageView no longer exists. You should not use this PhotoViewAttacher any more.");
}
return imageView;
}
示例12: onScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void onScale(float scaleFactor, float focusX, float focusY) {
if (DEBUG) {
LogManager.getLogger().d(
LOG_TAG,
String.format("onScale: scale: %.2f. fX: %.2f. fY: %.2f",
scaleFactor, focusX, focusY));
}
if ((getScale() < mMaxScale || scaleFactor < 1f) && (getScale() > mMinScale || scaleFactor > 1f)) {
if (null != mScaleChangeListener) {
mScaleChangeListener.onScaleChange(scaleFactor, focusX, focusY);
}
mSuppMatrix.postScale(scaleFactor, scaleFactor, focusX, focusY);
checkAndDisplayMatrix();
}
}
示例13: setScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void setScale(float scale, float focalX, float focalY,
boolean animate) {
ImageView imageView = getImageView();
if (null != imageView) {
// Check to see if the scale is within bounds
if (scale < mMinScale || scale > mMaxScale) {
LogManager
.getLogger()
.i(LOG_TAG,
"Scale must be within the range of minScale and maxScale");
return;
}
if (animate) {
imageView.post(new AnimatedZoomRunnable(getScale(), scale,
focalX, focalY));
} else {
mSuppMatrix.setScale(scale, scale, focalX, focalY);
checkAndDisplayMatrix();
}
}
}
示例14: setScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void setScale(float scale, float focalX, float focalY,
boolean animate) {
ImageView imageView = getImageView();
if (null != imageView) {
// Check to see if the scale is within bounds
if (scale < mMinScale || scale > mMaxScale) {
LogManager
.getLogger()
.i(LOG_TAG,
"Scale must be within the range of minScale and maxScale");
return;
}
if (animate) {
imageView.post(new AnimatedZoomRunnable(getScale(), scale,
focalX, focalY));
} else {
mSuppMatrix.setScale(scale, scale, focalX, focalY);
checkAndDisplayMatrix();
}
}
}
示例15: onScale
import uk.co.senab.photoview.log.LogManager; //导入依赖的package包/类
@Override
public void onScale(float scaleFactor, float focusX, float focusY) {
if (DEBUG) {
LogManager.getLogger().d(
LOG_TAG,
String.format("onScale: scale: %.2f. fX: %.2f. fY: %.2f",
scaleFactor, focusX, focusY));
}
mFocusX = focusX;
mFocusY = focusY;
mOnceScale *= scaleFactor;
if (Math.abs(mOnceScale - 1.0f) > 0.3f) {
mIsScale = true;
}
if (getScale() < mMaxScale || scaleFactor < 1f) {
if (null != mScaleChangeListener) {
mScaleChangeListener.onScaleChange(scaleFactor, focusX, focusY);
}
mSuppMatrix.postScale(scaleFactor, scaleFactor, focusX, focusY);
checkAndDisplayMatrix();
}
}