当我不完全拉动时,动画不会消失 如果没有完全拉动它应该消失
当我不完全拉动时,动画不会消失 如果没有完全拉动它应该消失
我的代码如下
public class SwipeRefresh extends TiUIView {
private MySwipeRefreshLayout layout;
private TiViewProxy view;
private Handler handler = new Handler();
int layout_swipe_refresh = 0;
// Constructor for SwipeRefresh
public SwipeRefresh(final SwipeRefreshProxy proxy) {
super(proxy);
LayoutInflater inflater = LayoutInflater.from(TiApplication
.getInstance());
layout = (MySwipeRefreshLayout) inflater.inflate(layout_swipe_refresh,
null, false);
layout.setOnRefreshListener(new OnRefreshListener() {
public void onRefresh() {
if (proxy.hasListeners("refreshing")) {
proxy.fireEvent("refreshing", null);
}
}
});
setNativeView(layout);
}
private final Runnable refreshing2 = new Runnable() {
public void run() {
layout.setRefreshing(false);
return;
}
};
public boolean isRefreshing() {
return this.layout.isRefreshing();
}
public void setRefreshing(boolean refreshing) {
handler.post(refreshing2);
}
}
我必须覆盖一个事件吗?