Fixed and always visible footer below ListFragment

后端 未结 1 670
半阙折子戏
半阙折子戏 2021-01-01 20:00

I\'m trying attach a footer, that is fixed and always visible, to the bottom of a ListFragment.

I\'m currently doing it like this:

@Override public v         


        
相关标签:
1条回答
  • 2021-01-01 20:33

    You can do that in the xml layout:

    <RelativeLayout>
    
        <Button android:id="@+id/footer" android:layout_alignParentBottom="true"/> 
        <ListView android:id="@android:id/list" android:layout_above="@id/footer"> <!-- the list -->
    
    </RelativeLayout>
    

    This layout will be used in the onCreateView method of the fragment.

    0 讨论(0)
提交回复
热议问题