0
나는 네비게이션 용 새끼 고양이 UI를 사용하고있다. title
및 headerLeft
을 렌더링 할 수 있지만 headerRight
은 표시되지 않습니다.headerRight가 밀리 초 단위로 표시되고 사라집니다. (반응 탐색)
이것은 navBar.js (ThemedNavigationBar)
_renderRight(headerRight) {
let windowWidth = Dimensions.get('window').width;
const width = this.state.width
? (windowWidth - this.state.width)/2
: undefined;
return headerRight && (
<View style={[{width}, styles.right]}>{headerRight}</View>
);
}
render() {
let options = this.props.headerProps.getScreenDetails(this.props.headerProps.scene).options;
return (
<View style={styles.layout}>
<View style={styles.container}>
{this._renderTitle(options.title, options.headerTitle)}
{this._renderLeft(options.headerLeft)}
{this._renderRight(options.headerRight)}
</View>
</View>
)
}
입니다 (이미지는이 질문의 맨 아래에 부착) 이것은 나의과 changepassword의 navigationOption
static navigationOptions = ({ navigation }) => ({
title: `Change Password`,
tabBarVisible: false,
headerRight: (<- RIGHT HERE
<Button
title='SAVE'
/>
),
header: (headerProps) => {
return <ThemedNavigationBar navigation={navigation} headerProps={headerProps}/>
}
});
<Button title='SAVE' />
가 표시되지 않습니다!
UPDATE 내가 지금 무슨 일이 벌어지고있는 거지 (30)에 0에서 styles.right.right
설정이 이상한 찾고 탐색을 얻고있다
?
left: {
position: 'absolute',
top: 0,
bottom: 0,
justifyContent: 'center'
},
right: {
position: 'absolute',
right: 30, <- I set right from 30 to 0 and I could see the button (But it shows just the part of the botton. Can I do it better?
top: 0,
bottom: 0,
justifyContent: 'center'
},
title: {
...StyleSheet.absoluteFillObject,
justifyContent: 'center',
alignItems: 'center',