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. 关于Java引用传递的一个困惑?2. 关于docker下的nginx压力测试3. angular.js - angularjs的自定义过滤器如何给文字加颜色?4. 如何分别在Windows下用Winform项模板+C#,在MacOSX下用Cocos Application项目模板+Objective-C实现一个制作游戏的空的黑窗口?5. javascript - 最终生成的jsBundle文件压缩问题6. docker安装后出现Cannot connect to the Docker daemon.7. android clickablespan获取选中内容8. android - 启动模拟器的,报“Could not automatically detect an ADB binary……”,要怎么解决?9. python - TypeError: tryMsgcode() takes exactly 2 arguments (0 given)10. javascript - canvas 裁剪空白区域
