I am using this library from Chris Banes (I will never thank this man enough). It has two different behaviors depending on the android version. I want to get rid of the graphical hint on the PullToRefresListView (circled in the image below) that is shown only on devices with android lower than 4.0.
Does anybody knows how to do it?
SOLUTION:
for anybody in the future searching for the same solution here it is: in the PullToRefreshAdapterViewBase class change getShowIndicatorInternal method from this:
private boolean getShowIndicatorInternal() {
return mShowIndicator && isPullToRefreshEnabled();
}
to this:
private boolean getShowIndicatorInternal() {
return false;
}
If you use a layout XML file, you can also specify ptr:ptrShowIndicator="false"
inside the PullToRefreshView
's declaration. For example:
<com.handmark.pulltorefresh.library.PullToRefreshListView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/pullToRefreshListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
ptr:ptrShowIndicator="false" >
</com.handmark.pulltorefresh.library.PullToRefreshListView>
For other attributes, you can refer to /res/values/attrs.xml in the library, which is self-documented.
You may also find the sample project worth looking at.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With