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

水平向右刷新的头部刷新控件的高度问题 #11

Open
feer921 opened this issue Oct 14, 2018 · 0 comments
Open

水平向右刷新的头部刷新控件的高度问题 #11

feer921 opened this issue Oct 14, 2018 · 0 comments

Comments

@feer921
Copy link

feer921 commented Oct 14, 2018

当HTRefreshRecyclerView 在布局文件中的android:layout_height="wrap_content",设置为wrap_content时,左边的刷新头部的高度就撑不起来了,即高度没有和Adapter填充数据后的高度一致,矮那么一截,
看源码,HTBaseRecyclerView方法内
private void setViewLayoutParams(View view) { if (view == null) return; ViewGroup.LayoutParams lp = view.getLayoutParams() == null ? new ViewGroup.LayoutParams(0, 0) : view.getLayoutParams(); lp.width = checkOrientationVertical() ? LayoutParams.MATCH_PARENT : LayoutParams.WRAP_CONTENT; lp.height = checkOrientationVertical() ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT; view.setLayoutParams(lp); }
明明给了MatchParent,为什么高度撑不起来呢?
image
如图,把HTRefreshRecyclerView 在布局文件中的android:layout_height="wrap_content",设置为wrap_content 就成这样了,而实际开发中,很多情况下,HTRefreshRecyclerView 的高度需要设置成android:layout_height="wrap_content"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant