我需要使副标题正确工作在我的桌子上,以便为它设置样式。目前,我没有成功。对于每个子标题,分别进入Under1Subheader,Under2ndSubheader和Under3rdSubheader。
componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);
}
componentDidMount() {
BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);
}
handleBackPress = () => {
console.log("handleBackPress Called on RootMenuView : current View ? : " + this.state.mainView);
if (this.state.mainView === "Main"){
return false;
} else{
//not this
//this.state.mainView = "Main";
// use this
this.setState({mainView: "Main"})
this.forceUpdate();
return true;
}
}