2017-01-14 4 views
0

setAdapterの後にフッターを追加しましたが、今はKitKatからうまく機能しますが、KitKatのバージョンより前には機能しません。私が得た4.4より前にアダプタを設定した後にフッタービューを追加する方法

ソリューションは、SOの質問ですthisからです:

  1. addFooterView(フッタ)。
  2. setAdapter(アダプター)。
  3. removeFooterView(footer);

しかし、私はフッタビューをsetAdapterの後に付けたいと思っていました。

答えて

0

なぜリストビューに表示されないのですか。

<RelativeLayout 
    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" /> 

    <SomeView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentLeft="true" 
     android:layout_alignParentStart="true" 
     android:layout_alignBottom="@+id/recyclerView" /> 

</RelativeLayout> 
関連する問題