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 - react能够使用什么时间插件2. node.js - 我是一个做前端的,求教如何学习vue,node等js引擎?3. docker api 开发的端口怎么获取?4. 如何解决Centos下Docker服务启动无响应,且输入docker命令无响应?5. 前端 - 类到底该如何去命名 .newsList 这种的命名难道真的不是过度语义化吗?~6. java - 为什么第一个线程已经释放了锁,第二个线程却不行?7. 如何解决docker宿主机无法访问容器中的服务?8. PHP中的$this代表当前的类还是方法?9. sublime-text - sublime text 3中编译python(sublimeREPL),如何仅运行单行/选定部分10. 老师,flex-shrink: 1; 按视频操作,不会自动缩放

网公网安备