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. pdo_mysql 值自增写法2. mysql - laravel 子查询的问题3. javascript - vue组件通过eventBus通信时,报错a.$on is not a function4. docker绑定了nginx端口 外部访问不到5. docker-machine添加一个已有的docker主机问题6. angular.js - angular内容过长展开收起效果7. javascript - 新组成的数组打印出来出现问题,里面有对象,但长度为空8. docker网络端口映射,没有方便点的操作方法么?9. dockerfile - 为什么docker容器启动不了?10. Docker for Mac 创建的dnsmasq容器连不上/不工作的问题

网公网安备