成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術(shù)文章
文章詳情頁

android - 如何RecyclerView的item寬度設(shè)置

瀏覽:257日期:2024-09-01 13:37:52

問題描述

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'/>

運行截圖:android - 如何RecyclerView的item寬度設(shè)置

求解。。。。

還有一個問題為什么AppCompatButton本來是小寫問什么運行成大寫了。。

問題解答

回答1:

大小寫問題需要設(shè)置下屬性android:textAllCaps為false

回答2:

看下你的onCreateViewHolder

相關(guān)文章: