android - 如何RecyclerView的item寬度設(shè)置
問(wèn)題描述
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)行截圖:
求解。。。。
還有一個(gè)問(wèn)題為什么AppCompatButton本來(lái)是小寫問(wèn)什么運(yùn)行成大寫了。。
問(wèn)題解答
回答1:大小寫問(wèn)題需要設(shè)置下屬性android:textAllCaps為false
回答2:看下你的onCreateViewHolder
相關(guān)文章:
1. mysql建表報(bào)錯(cuò),查手冊(cè)看不懂,求解?2. 求大神支招,php怎么操作在一個(gè)html文件的<head>標(biāo)記內(nèi)添加內(nèi)容?3. 致命錯(cuò)誤: Class ’appfacadeTest’ not found4. PHP類屬性聲明?5. php點(diǎn)贊一天一次怎么實(shí)現(xiàn)6. 怎么php怎么通過(guò)數(shù)組顯示sql查詢結(jié)果呢,查詢結(jié)果有多條,如圖。7. 在應(yīng)用配置文件 app.php 中找不到’route_check_cache’配置項(xiàng)8. 老師們php,插入數(shù)據(jù)庫(kù)mysql,都是空的,要怎么解決9. sql語(yǔ)句 - 如何在mysql中批量添加用戶?10. phpstady在win10上運(yùn)行
