0
我希望能夠在其Play商店應用中獲得與Google相同的結果。獲得類似Google Play商店「列表內列表」的結果
我能想到的唯一的辦法是增加一個Recyclerview在Recyclerview適配器像下面。
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
內部視圖
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="100dp"
card_view:cardCornerRadius="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
問題是內部Recyclerview將無法正確顯示。
你知道如何使它顯示其內容或你有任何想法如何實現它的另一種方式?
感謝
看來他們確實如此。我只是在屏幕截圖上刪除了我的信用卡號碼,但他們在「添加付款方式」元素上方一個接一個地添加了所有付款方式。 –
這並不意味着他們使用了一個listview。再次沒有涉及滾動 –
我明白,但他們如何實現呢?在LinearLayout中手動添加視圖?動畫對我來說真的看起來像一個回收視圖動畫。如果你想看,你可以自己檢查一下。 –