We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当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,为什么高度撑不起来呢? 如图,把HTRefreshRecyclerView 在布局文件中的android:layout_height="wrap_content",设置为wrap_content 就成这样了,而实际开发中,很多情况下,HTRefreshRecyclerView 的高度需要设置成android:layout_height="wrap_content"
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); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当HTRefreshRecyclerView 在布局文件中的android:layout_height="wrap_content",设置为wrap_content时,左边的刷新头部的高度就撑不起来了,即高度没有和Adapter填充数据后的高度一致,矮那么一截,
![image](https://user-images.githubusercontent.com/6622321/46919187-314c3e80-d00e-11e8-8403-6eb6106f2da8.png)
看源码,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,为什么高度撑不起来呢?
如图,把HTRefreshRecyclerView 在布局文件中的android:layout_height="wrap_content",设置为wrap_content 就成这样了,而实际开发中,很多情况下,HTRefreshRecyclerView 的高度需要设置成android:layout_height="wrap_content"
The text was updated successfully, but these errors were encountered: