ave*_*ini 5 android android-listview pull-to-refresh
我正在使用Chris Banes的这个库(我永远不会感谢这个人).它有两种不同的行为,具体取决于Android版本.我想摆脱只在android低于4.0的设备上显示的PullToRefresListView(下图中圈出)的图形提示.
有人知道怎么做吗?

解:
对于将来在这里搜索相同解决方案的任何人来说,它是:在PullToRefreshAdapterViewBase类中更改getShowIndicatorInternal方法:
private boolean getShowIndicatorInternal() {
return mShowIndicator && isPullToRefreshEnabled();
}
Run Code Online (Sandbox Code Playgroud)
对此:
private boolean getShowIndicatorInternal() {
return false;
}
Run Code Online (Sandbox Code Playgroud)
Tac*_*ers 10
如果使用布局XML文件,还可以ptr:ptrShowIndicator="false"在PullToRefreshView声明中指定.例如:
<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>
Run Code Online (Sandbox Code Playgroud)
对于其他属性,您可以参考库中的/res/values/attrs.xml,它是自我记录的.
您还可以找到值得关注的示例项目.
| 归档时间: |
|
| 查看次数: |
3162 次 |
| 最近记录: |