Skip to content

Commit bffd320

Browse files
author
愤怒的晃晃
committed
fix some view bug on small screen.
1 parent 984d495 commit bffd320

File tree

1 file changed

+38
-13
lines changed

1 file changed

+38
-13
lines changed

source/view/about.js

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {
33
View,
44
Text,
55
Image,
6+
Platform,
7+
ScrollView,
68
StyleSheet
79
} from 'react-native';
810

@@ -63,38 +65,58 @@ class AboutPage extends Component {
6365
}
6466

6567
renderUpdateItem(){
66-
const tailIcon = <Icon
68+
if(Platform.OS === 'android'){
69+
const tailIcon = <Icon
6770
name={ "ios-arrow-round-forward" }
6871
size= { 24 }
6972
style = { [CommonStyles.background_transparent] }/>
7073

71-
return (
72-
<Panel
73-
title = "更新历史"
74-
onPress = {()=>this.props.router.push(ViewPage.update())}
75-
descr = { "这里可以查看更新历史记录" }
76-
tailControl = { tailIcon }/>
77-
)
74+
return (
75+
<Panel
76+
title = "更新历史"
77+
onPress = {()=>this.props.router.push(ViewPage.update())}
78+
descr = { "这里可以查看更新历史记录" }
79+
tailControl = { tailIcon }/>
80+
)
81+
}
7882
}
83+
renderFooterPatch(){
84+
return (
85+
<View style={ styles.footerPatch }>
86+
</View>
87+
)
88+
}
89+
7990

8091
renderCopyright(){
8192
return (
8293
<View style={ [ComponentStyles.pos_absolute, styles.footer]}>
83-
<Text style={ [ CommonStyles.text_center, CommonStyles.m_b_4, CommonStyles.text_muted ] }>
94+
<Text style={ [ CommonStyles.text_center, CommonStyles.p_y_4, CommonStyles.text_muted ] }>
8495
{ Config.appInfo.copyright }
8596
</Text>
8697
</View>
8798
)
8899
}
89-
90-
render() {
100+
101+
renderContent(){
91102
return (
92-
<View style={ ComponentStyles.container }>
93-
{ this.renderNavbar() }
103+
<ScrollView
104+
showsVerticalScrollIndicator = {false}
105+
showsHorizontalScrollIndicator = {false}>
94106
{ this.renderAboutItem() }
95107
{ this.renderUpdateItem() }
96108
{ this.renderDeclareItem() }
97109
{ this.renderAuthorItem() }
110+
{ this.renderFooterPatch() }
111+
</ScrollView>
112+
)
113+
}
114+
115+
render() {
116+
return (
117+
<View style={ ComponentStyles.container }>
118+
{ this.renderNavbar() }
119+
{ this.renderContent() }
98120
{ this.renderCopyright() }
99121
</View>
100122
);
@@ -109,6 +131,9 @@ export const styles = StyleSheet.create({
109131
},
110132
footer:{
111133
bottom : 0
134+
},
135+
footerPatch: {
136+
height: 60
112137
}
113138
});
114139

0 commit comments

Comments
 (0)