Tap to refresh is shown when only two items in ListView
shadabhub opened this issue · 6 comments
shadabhub commented
Tap to refresh is shown when only two items in ListView.
Can "Tap to refresh" can be hidden when listview content few items(2 or 3 items).?
lhhGit commented
This issue bothers me too.
vinceyuan commented
My walkaround is adding a big empty footer view into the list view. Note that you have to add the footer view before setting the list adapter.
danwebanddev commented
I get this issue too.
@vinceyuan your workaround doesn't work for me, could you post the xml of your footer view, please?
vinceyuan commented
@danwebanddev The tricky thing is we must add an inner layout otherwise the customized height does not work.
<!--Must add an inner layout otherwise the customized height does not work-->
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/footer_view_small_height" >
</FrameLayout>
vinceyuan commented
Correct code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<!--Must add an inner layout otherwise the customized height does not work-->
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/footer_view_small_height" >
</FrameLayout>
</RelativeLayout>
danwebanddev commented
@vinceyuan
Thank you very much, I will try!