android6.0 PullToRefreshWebView中的FloatMath.floor()不能用了怎么替换

azas545277479 2015-10-09 01:28:25
protected boolean isReadyForPullEnd() {
float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}


其中floor要报错怎么替换啊
...全文
2730 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cc_wentian 2017-05-15
  • 打赏
  • 举报
回复
还是不行,出现 错误: 不兼容的类型: 从double转换到float可能会有损失
被收了 2016-12-26
  • 打赏
  • 举报
回复
我觉得还是计算高度没算出来,,有没有什么办法啊
被收了 2016-12-26
  • 打赏
  • 举报
回复
float exactContentHeight = (float) Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
是不是需要强转一下啊,,可是强转玩还是不好用啊
azas545277479 2016-12-02
  • 打赏
  • 举报
回复
一楼正解使用 Math.floor 代替 FloatMath.floor
android_dvp 2016-07-27
  • 打赏
  • 举报
回复
楼上你怎么弄好的,同求
azas545277479 2015-10-10
  • 打赏
  • 举报
回复
ok可以了,谢谢!
w_yuetian 2015-10-09
  • 打赏
  • 举报
回复
Android6.0使用 Math.floor 代替 FloatMath.floor 即可;

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧