Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上拉加载时会把顶部布局顶出去 #192

Closed
kingyangcn opened this issue May 30, 2022 · 8 comments
Closed

上拉加载时会把顶部布局顶出去 #192

kingyangcn opened this issue May 30, 2022 · 8 comments
Labels
寻求帮助 Extra attention is needed

Comments

@kingyangcn
Copy link

问题描述

使用PageRefreshLayout包裹CoordinatorLayout,上拉加载时会把顶部布局顶出去。

期望行为

如何复现

https://github.com/kingyangcn/BRV

截图

https://github.com/kingyangcn/Test/blob/master/b.mp4?raw=true

版本

  • BRV:
  • Gradle:
  • Android Studio:
  • Android:
@kingyangcn kingyangcn added the 寻求帮助 Extra attention is needed label May 30, 2022
@liangjingkanji
Copy link
Owner

liangjingkanji commented May 30, 2022

这是SmartRefreshLayout的功能, 使用以下代码关闭(也可以全局配置关闭)

page.setEnableFooterTranslationContent(false)

你的提问姿势非常正确, 以后给你优先解决问题!

@kingyangcn
Copy link
Author

这是SmartRefreshLayout的功能, 使用以下代码关闭(也可以全局配置关闭)

page.setEnableFooterTranslationContent(false)

你的提问姿势非常正确, 以后给你优先解决问题!

这样设置加载更多的动画会覆盖到item上,不符合预期。不熟悉SmartRefreshLayout,麻烦请教下大佬有没有什么优雅的解决方案

@liangjingkanji
Copy link
Owner

liangjingkanji commented May 30, 2022

为什么会覆盖在item, 加载完毕后加载动画会消失. 我想不到其他实现方式了

如果这个还不满足的话建议别用上拉加载动画了, 很多app都不做这种上拉加载动画的, 直接预加载

@kingyangcn
Copy link
Author

为什么会覆盖在item, 加载完毕后加载动画会消失. 我想不到其他实现方式了

如果这个还不满足的话建议别用上拉加载动画了, 很多app都不做这种上拉加载动画的, 直接预加载

如图。加载时会覆盖在item上面,看起来不太和谐。需求方要求必须有加载动画。如果使用PageRefreshLayout嵌套的话会不会有问题呢
https://github.com/kingyangcn/BRV/raw/master/1.jpg

@liangjingkanji
Copy link
Owner

能否fork仓库复现此问题:加载时会覆盖在item上面让我看下

@kingyangcn
Copy link
Author

能否fork仓库复现此问题:加载时会覆盖在item上面让我看下

代码已提交
https://github.com/kingyangcn/BRV

@liangjingkanji
Copy link
Owner

使用以下代码修复

// binding.page.setEnableFooterTranslationContent(false) 删除这一行
binding.page.setFooterTranslationViewId(R.id.rv)

@kingyangcn
Copy link
Author

使用以下代码修复

// binding.page.setEnableFooterTranslationContent(false) 删除这一行
binding.page.setFooterTranslationViewId(R.id.rv)

感谢大佬指点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
寻求帮助 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants