oblador / react-native-lightbox

Images etc in Full Screen Lightbox Popovers for React Native
MIT License
2.82k stars 501 forks source link

when i click the picture, the picture will zoom out but didnot cover the full screen. #73

Open TonyGao625 opened 7 years ago

TonyGao625 commented 7 years ago

I used react-native-lightbox with react navigation. when i click the picture, the picture will zoom out but didnot cover the full screen. the header was not fully covered. Please see the picture below.

image

image

Here is my code. class LightboxView extends Component { componentWillMount() { this.props.dispatch(getBookById(this.props.id)); } render() { const { BookDetail } = this.props; return ( <ScrollableTabView style={styles.container} renderTabBar={() => } tabBarPosition='overlayTop'

{BookDetail.BookName} 图书介绍: {BookDetail.Remark} 作者: {BookDetail.Author} 出版日期: {!BookDetail.PublicDate ? "无" : Moment(BookDetail.PublicDate).format('MM/DD/YYYY')} 分类: {BookDetail.CategoryName} 借阅起始日 还书日 借阅人
                {BookDetail.BookBorrowList && BookDetail.BookBorrowList.map((val) => {
                    return <View style={{ flexDirection: 'row', marginTop: 10 }} key={val.Id} >
                        <View style={{ flex: 1, marginLeft: 18 }}>
                            <Text style={styles.boldText}>{Moment(val.BorrowDate).format('MM/DD/YYYY')}</Text>
                        </View>
                        <View style={{ flex: 1 }}>
                            <Text style={styles.boldText}>{!val.ReturnDate ? "未还" : Moment(val.ReturnDate).format('MM/DD/YYYY')}</Text>
                        </View>
                        <View style={{ flex: 1, marginRight: 0 }}>
                            <Text style={styles.boldText}>{!val.UserName ? "" : val.UserName}</Text>
                        </View>
                    </View>
                })}
            </ScrollView>
        </ScrollableTabView>
    );
}

}

export default class BookDetailDisplays extends Component { renderScene = (route, navigator) => { var Component = route.component; return ( <Component navigator={navigator} id={this.props.id} route={route} {...route.passProps} /> ); }

render() {
    return (
        <Navigator
            ref="navigator"
            style={styles.navigator}
            renderScene={this.renderScene}
            initialRoute={{
                component: LightboxView,
            }}
        />
    );
}

}