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. javascript - [,null]是什么用法2. dockerfile - [docker build image失败- npm install]3. java - 对于jsp技术,aspx技术的困惑4. java - jvm 年轻代 如何回收 survivor 对象5. docker-compose中volumes的问题6. java - idea如何不显示.idea target这些文件夹7. css - 使用blur()滤镜为什么有透明的效果8. java - spring-data Jpa 不需要执行save 语句,Set字段就可以自动执行保存的方法?求解9. javascript - Vue.js2.0不能使用debounce后大伙一般是如何解决延迟请求的问题的呢。10. javascript - 移动端H5页面禁止缩放了,在浏览器上仍然可以缩放
