I stuck on android method FloatMath.floor API does not issue

Aphikrit Gerbert Saravasri picture Aphikrit Gerbert Saravasri · Sep 11, 2015 · Viewed 10.3k times · Source

Method:

@Override
protected boolean isReadyForPullEnd() {
    @SuppressWarnings("deprecation")
    float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
    return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

Output: Error:(116, 39) error: cannot find symbol method floor(float)

Any one idea to fix this one?

Answer

Sfseyhan picture Sfseyhan · Sep 11, 2015

FloatMath utility class is deprecated. Use Math.floor instead.