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. docker start -a dockername 老是卡住,什么情況?2. docker images顯示的鏡像過多,狗眼被亮瞎了,怎么辦?3. docker gitlab 如何git clone?4. dockerfile - [docker build image失敗- npm install]5. docker不顯示端口映射呢?6. docker-compose 為何找不到配置文件?7. docker內創建jenkins訪問另一個容器下的服務器問題8. node.js - 我是一個做前端的,求教如何學習vue,node等js引擎?9. css - 請教一個布局的問題10. javascript - js 多維數組的問題
