Ver código fonte

[显示][修改]:适配真机大屏的点阵比

tags/jenkins-front-end-screenad-71-v46^0
hupeng 6 anos atrás
pai
commit
92c7af45c8
1 arquivos alterados com 39 adições e 38 exclusões
  1. +39
    -38
      App.js

+ 39
- 38
App.js Ver arquivo

@@ -7,6 +7,7 @@ import {
View,
Image,
ImageBackground,
PixelRatio,
NativeModules
} from 'react-native';

@@ -383,7 +384,7 @@ render() {
<Image source={{ uri: this.state.baseInfo.imgQrcodeWemp, cache: 'force-cache'}} resizeMode='center' style={styles.bottomQrcode2} />
<Text style={styles.bottomQrcode1Str}>公众号</Text>
</View>
<Text style={styles.bottomPlacehold}>{this.state.versionInfo}</Text>
<Text style={styles.bottomPlacehold}>{this.state.versionInfo}+{PixelRatio.get()}}</Text>
</View>

</ImageBackground>
@@ -399,7 +400,7 @@ render() {
backgroundColor:'transparent',
textAlign :'center',
textAlignVertical:'center',
fontSize: 24,
fontSize: 24*PixelRatio.get(),
color: 'darkblue'
},

@@ -415,8 +416,8 @@ render() {
flex: 6,
flexDirection: 'row',
alignItems: 'center',
paddingLeft:16,
paddingRight:16,
paddingLeft:16*PixelRatio.get(),
paddingRight:16*PixelRatio.get(),
backgroundColor:'transparent'
},

@@ -431,8 +432,8 @@ render() {
flex: 2,
flexDirection: 'row',
alignItems: 'center',
paddingLeft:16,
paddingRight:16,
paddingLeft:16*PixelRatio.get(),
paddingRight:16*PixelRatio.get(),
backgroundColor:'transparent'
},

@@ -475,24 +476,24 @@ render() {
//layer bottom
bottomLogoBackground: {
flex: 3,
borderRadius:6,
marginTop: 10,
marginBottom: 10,
borderRadius:6*PixelRatio.get(),
marginTop: 10*PixelRatio.get(),
marginBottom: 10*PixelRatio.get(),
backgroundColor:'white'
},
bottomLogo: {
width:'100%',
height:'100%',
borderRadius:10,
borderRadius:10*PixelRatio.get(),
backgroundColor:'transparent'
},
bottomQrcode1Background : {
flex: 1,
width:'100%',
height:'100%',
marginLeft: 8,
paddingTop: 10,
paddingBottom: 4,
marginLeft: 8*PixelRatio.get(),
paddingTop: 10*PixelRatio.get(),
paddingBottom: 4*PixelRatio.get(),
flexDirection: 'column',
backgroundColor:'transparent'
},
@@ -501,9 +502,9 @@ render() {
flex: 1,
width:'100%',
height:'100%',
marginLeft: 8,
paddingTop: 10,
paddingBottom: 4,
marginLeft: 8*PixelRatio.get(),
paddingTop: 10*PixelRatio.get(),
paddingBottom: 4*PixelRatio.get(),
flexDirection: 'column',
backgroundColor:'transparent'
},
@@ -526,7 +527,7 @@ render() {
flex: 1,
textAlign :'center',
textAlignVertical:'center',
fontSize: 6,
fontSize: 6*PixelRatio.get(),
color : 'black',
backgroundColor:'transparent'
},
@@ -535,7 +536,7 @@ render() {
flex: 1,
textAlign :'center',
textAlignVertical:'center',
fontSize: 6,
fontSize: 6*PixelRatio.get(),
color : 'black',
backgroundColor:'transparent'
},
@@ -547,7 +548,7 @@ render() {
backgroundColor:'transparent',
textAlign :'right',
textAlignVertical:'bottom',
fontSize: 10,
fontSize: 10*PixelRatio.get(),
color : 'gray'
},

@@ -570,8 +571,8 @@ render() {
},

contentItemUpLayer:{
width:80,
height:58,
width:80*PixelRatio.get(),
height:58*PixelRatio.get(),
position:'absolute',
backgroundColor:'transparent'
},
@@ -580,9 +581,9 @@ render() {
flex: 3,
width:'100%',
height:'100%',
paddingLeft: 25,
paddingRight: 20,
paddingTop: 15,
paddingLeft: 25*PixelRatio.get(),
paddingRight: 20*PixelRatio.get(),
paddingTop: 15*PixelRatio.get(),
flexDirection: 'row',
alignItems: 'center',
backgroundColor:'transparent'
@@ -592,9 +593,9 @@ render() {
flex: 1,
width:'100%',
height:'100%',
paddingLeft: 25,
paddingRight: 20,
paddingBottom: 15,
paddingLeft: 25*PixelRatio.get(),
paddingRight: 20*PixelRatio.get(),
paddingBottom: 15*PixelRatio.get(),
flexDirection: 'row',
alignItems: 'center',
backgroundColor:'transparent'
@@ -605,7 +606,7 @@ render() {
flex: 5,
width:'100%',
height:'100%',
borderRadius:10,
borderRadius:10*PixelRatio.get(),
backgroundColor:'transparent'
},

@@ -613,8 +614,8 @@ render() {
flex: 6,
width:'100%',
height:'100%',
paddingLeft: 10,
paddingRight: 30,
paddingLeft: 10*PixelRatio.get(),
paddingRight: 30*PixelRatio.get(),
alignItems: 'center',
backgroundColor:'transparent'
},
@@ -635,14 +636,14 @@ render() {
backgroundColor:'transparent',
textAlign :'center',
textAlignVertical:'center',
fontSize: 10,
fontSize: 10*PixelRatio.get(),
fontWeight : 'bold'
},

contentItemBottomPlacehold:{
flex: 6,
paddingLeft: 10,
paddingRight: 30,
paddingLeft: 10*PixelRatio.get(),
paddingRight: 30*PixelRatio.get(),
width:'100%',
height:'100%',
backgroundColor:'transparent',
@@ -666,7 +667,7 @@ render() {
backgroundColor:'transparent',
textAlign :'left',
textAlignVertical:'center',
fontSize: 20,
fontSize: 20*PixelRatio.get(),
color: 'darkgray'
},

@@ -677,7 +678,7 @@ render() {
backgroundColor:'transparent',
textAlign :'left',
textAlignVertical:'center',
fontSize: 10,
fontSize: 10*PixelRatio.get(),
color : 'gray'
},

@@ -701,7 +702,7 @@ render() {
backgroundColor:'transparent',
textAlign :'left',
textAlignVertical:'bottom',
fontSize: 32,
fontSize: 32*PixelRatio.get(),
color : 'red'
},

@@ -709,7 +710,7 @@ render() {
backgroundColor:'transparent',
textAlign :'left',
textAlignVertical:'bottom',
fontSize: 10,
fontSize: 10*PixelRatio.get(),
color : 'red'
},

@@ -726,7 +727,7 @@ render() {
backgroundColor:'transparent',
textAlign :'left',
textAlignVertical:'bottom',
fontSize: 10,
fontSize: 10*PixelRatio.get(),
textDecorationLine: 'line-through',
color : 'gray'
},


Carregando…
Cancelar
Salvar