【发布时间】:2015-01-14 08:25:09
【问题描述】:
我在项目中使用了this pull-to-refresh library,代码如下:
<LinearLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:background="@color/transparent"
android:visibility="invisible" />
<com.markupartist.android.widget.PullToRefreshListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="#00000000"
android:clipToPadding="false"
android:divider="@null"
android:dividerHeight="16dp"
android:fadingEdge="none"
android:listSelector="@android:color/transparent"
android:scrollbarStyle="insideInset"/>
</LinearLayout>
当我看到它运行良好的示例时,它还显示了加载动画视图。
但在我的项目中,使用上面的代码,它没有显示加载动画视图。
listView.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh() {
System.out.println("Pull to refresh called");
onRefreshClicked(); // To Refresh my list
listView.onRefreshComplete();
}
});
这有什么问题?
【问题讨论】:
标签: android listview pull-to-refresh