@lilithgames/rn-scrollview
v1.0.40
Published
The ScrollView, extend from react-native-spring-scrollview by @bolan9999.
Downloads
19
Keywords
Readme
rn-scrollview
this._offsetY.setValue(this._offsetYValue); 能做到准确的偏移 this.listViewRef._forceUpdateContent 能做到准确偏移后的内容刷新
Usage
const rnScrollview = require('rn-scrollview');
// TODO: DEMONSTRATE API
扩展
ChineseNormalFooter
import { NormalFooter } from "../NormalFooter";
export class ChineseNormalFooter extends NormalFooter {
getTitle() {
const s = this.state.status;
if (s === "dragging" || s === "waiting") {
return "上拉加载更多";
} else if (s === "draggingEnough") {
return "松开加载更多";
} else if (s === "loading") {
return "正在加载数据...";
} else if (s === "draggingCancel") {
return "放弃加载更多";
} else if (s === "rebound") {
return "加载完成";
} else if (s === "allLoaded") {
return "已经到底啦";
}
}
}
ChineseNormalHeader
import {NormalHeader} from "../NormalHeader";
export class ChineseNormalHeader extends NormalHeader{
getTitle() {
const s = this.state.status;
if (s === "pulling" || s === "waiting") {
return "下拉可以刷新";
} else if (s === "pullingEnough") {
return "松开立即刷新";
} else if (s === "refreshing") {
return "正在刷新数据中...";
} else if (s === "pullingCancel") {
return "放弃刷新";
} else if (s === "rebound") {
return "刷新完成";
}
}
}