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. 視頻文件不能播放,怎么辦?2. node.js - nodejs開發(fā)中常用的連接mysql的庫3. mysql replace 死鎖4. phpstudy pro小皮面板經常報這個nginx: [emerg] CreateFile【急】5. 老師您的微信號是多少?6. mysql - 把一個表中的數(shù)據count更新到另一個表里?7. mysql - 分庫分表、分區(qū)、讀寫分離 這些都是用在什么場景下 ,會帶來哪些效率或者其他方面的好處8. 請教使用PDO連接MSSQL數(shù)據庫插入是亂碼問題?9. 雙擊安裝程序,安裝不了10. mysql - 字符串根據字典替換
