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 - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. Apache 已經把網站根目錄的改為allow from all了,但是服務器還是不能訪問?4. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~5. javascript - 移動端上不能實現拖拽布局嗎?6. phpstudy8.1支持win11系統嗎?7. 實現bing搜索工具urlAPI提交8. 配置Apache時,添加對PHP的支持時語法錯誤9. javascript - nodejs關于進程間發送句柄的一點疑問10. vue.js - Vue 如何像Angular.js watch 一樣監聽數據變化

網公網安備