이 디자인을 디자인하려고합니다. react-native
. 이것은 내가 이것을 코딩 한 것이지만 이것은 내가 원하는 것이 아니다. 이것은 한 화면에서만 작동합니다. 화면 크기를 변경하면 문제가 해결되지 않습니다.모든 장치에 대해 반응 형 네이티브 호환 화면을 디자인하는 방법
이것은 절대적인 레이아웃처럼 보입니다. 내가 모든 화면 크기에서 작동 할 수 있도록하기 위해 어떤 방식으로 변경해야합니까?
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from "react";
import {
AppRegistry,
Image,
View,
Text,
Button,
StyleSheet
} from "react-native";
class SplashScreen extends Component {
render() {
console.disableYellowBox = true;
return (
<View style={styles.container}>
<Image
source={require("./img/talk_people.png")}
style={{ width: 300, height: 300 }}
/>
<Text style={{ fontSize: 22, textAlign: "center", marginTop: 30 }}>
Never forget to stay in touch with the people that matter to you.
</Text>
<View style={{ marginTop: 60, width: 240 }}>
<Button title="CONTINUE" color="#FE434C" />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
backgroundColor: "#FFFFFF",
margin: 50,
alignItems: "center",
flex: 1,
flexDirection: "column"
}
});
AppRegistry.registerComponent("Scheduled",() => SplashScreen);
예상 주 :
현재 상태 :
넥서스 4 - 768x1280
이것을 처리하는 패키지가 있습니까? RN 개발자를위한 꽤 일반적인 작업처럼 보입니다. –