1. 程式人生 > >react-native的清除快取的元件

react-native的清除快取的元件

( <ScrollView> <View style={styles.container}> <TopHeader title={'設定'} leftBtn={leftBtn.BACK} backPath={'Info'} navigation={this.props.navigation}/> <View> <ListItem title={'清除快取'
} containerStyle={{borderBottomWidth : 0, height: scaleSize(100)}} titleStyle={{fontSize: 14}} titleContainerStyle={styles.titleContainer} hideChevron={true} onPress={()=>{this
.refs['clearCache'].show()}} rightTitle={this.state.cacheSize+this.state.unit} /> </List> </View> </View> <AlertDialog messageText={'確定要清除快取嗎?'
} negativeText={'取消'} positiveText={'確定'} onPress={(data) => data ? this.clearCache() : null} ref={'clearCache'} > </AlertDialog> </ScrollView> )
; }