android - 如何RecyclerView的item寬度設(shè)置
問題描述
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'/>
運(yùn)行截圖:
求解。。。。
還有一個問題為什么AppCompatButton本來是小寫問什么運(yùn)行成大寫了。。
問題解答
回答1:大小寫問題需要設(shè)置下屬性android:textAllCaps為false
回答2:看下你的onCreateViewHolder
相關(guān)文章:
1. javascript - Ajax加載Json時,移動端頁面向左上角縮小一截兒,加載完成后才正常顯示,這該如何解決?2. css - 如何讓圖片像雲(yún)一樣的行為?3. python小白 想做一個能夠計算圓周率的代碼,不知道怎么寫4. javascript - h5 video層級太高導(dǎo)致浮在div上面,如何解決?5. mysql - 數(shù)據(jù)庫建表方面的問題?6. javascript - 解釋下這種函數(shù)定義7. javascript - 如何獲取未來元素的父元素在頁面中所有相同元素中是第幾個?8. python中怎么對列表以區(qū)間進(jìn)行統(tǒng)計?9. java - 多客戶端如何操作MQ比較合適10. css - C#與java開發(fā)Windows程序哪個好?
