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 - js 修改表格元素的,可以用DOM操作實現嗎?2. python中def定義的函數加括號和不加括號的區別?3. javascript - js setTimeout在雙重for循環中如何使用?4. javascript - js 萬物皆對象的問題5. 點擊頁面就自動輸入到mysql.求解6. javascript - js一個call和apply的問題?7. 跪求解答關于emmetc插件生效的問題8. node.js - JavaScript的一個不能理解的地方9. python - xpath提取網頁路徑沒問題,但是缺失內容?10. javascript - 關于微信公眾號開發的一個trouble!
