Skip to content

help ~ refreshableWaitingView is not work? #108

@ycb0318

Description

@ycb0318
_renderRefreshableWaitingView(refreshCallback) {
    if (Platform.OS == 'ios') {
        return (
            <View style={customStyles.refreshableView}>
                <Text style={customStyles.actionsLabel}>
                    ↓
                </Text>
            </View>
        );
    } else {
        return (
            <TouchableHighlight
                underlayColor='#c8c7cc'
                onPress={refreshCallback}
                style={customStyles.refreshableView}
            >
                <Text style={customStyles.actionsLabel}>
                    ↻
                </Text>
            </TouchableHighlight>
        );
    }
}



_renderRefreshableWillRefreshView() {
    return (
        <View style={customStyles.refreshableView}>
            <Text style={customStyles.actionsLabel}>
                ↻
            </Text>
        </View>
    );
}

render() {
    return (
        <View style={styles.container}>
            <GiftedListView
                rowView={this._renderRowView.bind(this)}
                onFetch={this._onFetch}
                firstLoader={true} // display a loader for the first fetching
                pagination={true} // enable infinite scrolling using touch to load more
                refreshable={true} // enable pull-to-refresh for iOS and touch-to-refresh for Android
                withSections={false} // enable sections
                customStyles={{
                    paginationView: {
                        backgroundColor: '#eee',
                    },
                }}

                refreshableTintColor="blue"
                enableEmptySections = {true}
                refreshableWillRefreshView={this._renderRefreshableWillRefreshView}
                refreshableWaitingView={this._renderRefreshableWaitingView}
            />
        </View>
    );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions