0
간단한 로그인 화면을 만들려고합니다. 그러나 콘텐츠를 가운데 맞추기 위해 정당화하려고 할 때 요소가 위아래로 뛰는 것을 멈추지 않습니다. . flex 또는 justifyContent 특성을 제거하면 점프가 중지됩니다. 내 코드는 유일한 해결책에 어디반응하는 네이티브 컨텐트 센터가 안드로이드에서 항목을 뛰어 넘고 있습니다.
export default class LoginScreen extends React.Component {
render() {
return (
<View style={Styles.container} >
<Text>Hello world</Text>
</View>
)}
let Styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
// padding: 15,
// backgroundColor: 'red',
justifyContent: 'center',
alignItems: 'center',
},
)
내 App.js 내 자신의 응용 프로그램에서이 문제를 해결하기 위해 노력 후이
import { Platform } from 'react-native';
import { Navigation } from 'react-native-navigation';
import registerScreens from './app/Screens';
import {
AppRegistry,
Text,
} from 'react-native';
registerScreens();
let tabs = [
{
label: 'Login',
screen: 'tasks.LoginScreen', // this is a registered name for a screen
icon: require('./assets/account_circle.png'),
// selectedIcon: require('../img/one_selected.png'), // iOS only
title: 'Hello world'
},
{
label: 'Two',
screen: 'tasks.CreateUserScreen',
icon: require('./assets/account_circle.png'),
// selectedIcon: require('../img/two_selected.png'), // iOS only
title: 'Screen Two'
}
]
Navigation.startTabBasedApp({
tabs,
animationType: Platform.OS === 'ios' ? 'slide-down' : 'fade',
tabsStyle: {
tabBarBackgroundColor: '#003a66',
tabBarButtonColor: '#ffffff',
tabBarSelectedButtonColor: '#ff505c',
tabFontFamily: 'BioRhyme-Bold',
},
appStyle: {
tabBarBackgroundColor: '#003a66',
navBarButtonColor: '#ffffff',
tabBarButtonColor: '#ffffff',
navBarTextColor: '#ffffff',
tabBarSelectedButtonColor: '#ff505c',
navigationBarColor: '#003a66',
navBarBackgroundColor: '#003a66',
statusBarColor: '#002b4c',
tabFontFamily: 'BioRhyme-Bold',
},
drawer: {
left: {
screen: 'tasks.LoginScreen'
}
}
});
로그인 화면에서 점프에 대한 스크린 샷 또는 gif를 제공 할 수 있습니까? 귀하의 로그인 화면 코드에 아무 문제가 없습니다. –
정확하게 동일한 문제가 발생했습니다. 여기에 문제의 .GIF가 있습니다. https://i.gyazo.com/644cb6c6c309ce83ca7dae881f6342f1.gif –