Authored by 孙凯

适配 iPhoneXreview by hongmo

... ... @@ -21,6 +21,7 @@ import Comments from './Comments';
import CommentsTitle from './CommentsTitle';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import YH_Video from '../../../common/components/YH_Video';
import DeviceInfo from 'react-native-device-info';
import ReactNative, {
View,
... ... @@ -83,6 +84,11 @@ export default class Detail extends Component {
_keyboardWillShow(e){
let endH = e.endCoordinates.height;
let duration = e.duration;
if (deviceId == 'iPhone10,3' || deviceId == 'iPhone10,6')
{
endH = endH - 34;
}
Animated.timing(
    this.state.viewMarginTop,
    {
... ... @@ -274,7 +280,7 @@ export default class Detail extends Component {
return (
<View style={styles.container}>
{!isFetching?<Animated.View style={{width: width,height: height - 64,marginTop:this.state.viewMarginTop}}>
{!isFetching?<Animated.View style={{flex: 1,top:this.state.viewMarginTop}}>
<ListView
ref={(ref)=>this.listView=ref}
initialListSize={1}
... ... @@ -336,12 +342,11 @@ export default class Detail extends Component {
}
let {width, height} = Dimensions.get('window');
let deviceId = DeviceInfo.getDeviceId();
let styles = StyleSheet.create({
container: {
flex: 1,
width: width,
height: height - 64,
},
contentContainer:{
backgroundColor: 'white',
... ...