android - 如何RecyclerView的item宽度设置
问题描述
item的布局:
<LinearLayout xmlns:android='http://schemas.android.com/apk/res/android' android:layout_width='match_parent' android:layout_height='wrap_content' android:orientation='vertical'> <android.support.v7.widget.AppCompatButtonandroid:layout_height='wrap_content'android:text='Text'android: android:layout_width='match_parent'/></LinearLayout>
RecyclerView:
<android.support.v7.widget.RecyclerViewandroid: android:layout_width='match_parent'android:layout_height='match_parent'android:scrollbars='vertical'/>
运行截图:
求解。。。。
还有一个问题为什么AppCompatButton本来是小写问什么运行成大写了。。
问题解答
回答1:大小写问题需要设置下属性android:textAllCaps为false
回答2:看下你的onCreateViewHolder
相关文章:
1. 为什么一个类里面只能有一个私有的 我不知道按了什么谁给解释一下2. javascript - 小demo:请教怎么做出类似于水滴不断扩张的效果?3. python3的各种库的官方文档中文版在哪儿可以找到4. 求大神帮我看看是哪里写错了 感谢细心解答5. macos - mac用VMware Fusion安装了centos7,我怎么把centos映射到本地,就像windows映射一个网络位置6. html5 - css3scale和rotate同时使用转换成matrix写法该如何转换?7. thinkjs - 使用mysql搭建cms应该如何设计表?或怎样开始?8. mysql 获取时间函数unix_timestamp 问题?9. python - nginx为什么不能反代图片?10. php自学从哪里开始?
