diff --git a/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java b/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java index 0b7464fd..4185cfd3 100644 --- a/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java +++ b/menudrawer/src/main/java/net/simonvt/menudrawer/Scroller.java @@ -19,7 +19,6 @@ package net.simonvt.menudrawer; import android.content.Context; import android.hardware.SensorManager; import android.os.Build; -import android.util.FloatMath; import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; @@ -371,7 +370,7 @@ class Scroller { float dx = (float) (mFinalX - mStartX); float dy = (float) (mFinalY - mStartY); - float hyp = FloatMath.sqrt(dx * dx + dy * dy); + float hyp = (float) Math.sqrt(dx * dx + dy * dy); float ndx = dx / hyp; float ndy = dy / hyp; @@ -388,7 +387,7 @@ class Scroller { mMode = FLING_MODE; mFinished = false; - float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); + float velocity = (float) Math.sqrt(velocityX * velocityX + velocityY * velocityY); mVelocity = velocity; final double l = Math.log(START_TENSION * velocity / ALPHA); diff --git a/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java b/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java index 3f873de0..a008e424 100644 --- a/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java +++ b/pulltorefresh/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshWebView.java @@ -21,7 +21,6 @@ import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Bundle; import android.util.AttributeSet; -import android.util.FloatMath; import android.webkit.WebChromeClient; import android.webkit.WebView; @@ -112,7 +111,7 @@ public class PullToRefreshWebView extends PullToRefreshBase { @Override protected boolean isReadyForPullEnd() { - float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()); + float exactContentHeight = (float) Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()); return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight()); } @@ -158,7 +157,7 @@ public class PullToRefreshWebView extends PullToRefreshBase { } private int getScrollRange() { - return (int) Math.max(0, FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()) + return (int) Math.max(0, Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()) - (getHeight() - getPaddingBottom() - getPaddingTop())); } }