cbbfcd / react-native-lightbox

Images etc in Full Screen Lightbox Popovers for React Native
MIT License
63 stars 27 forks source link

image not full size in viewing mode #8

Closed fukemy closed 2 years ago

fukemy commented 2 years ago

hi, please help my problem: Screen Shot 2022-04-21 at 15 15 23 Screen Shot 2022-04-21 at 15 15 31

here is my code:


//chatscreen
 const renderImageView = (props) => {
        if(props.currentMessage.image){
            return <ChatImage {...props}/>
        }
        return null
    }

export function ChatImage(props) {
    console.log(props.currentMessage.image)
    return (
        <LightBox navigator={null}>
            <Image
                style={{
                    width: 180,
                    height: 180,
                    borderRadius: 8
                }}
                resizeMode='cover'
                source={{ uri: props.currentMessage.image }}
            />
        </LightBox>
    )
}
cbbfcd commented 2 years ago

sorry for late response, i think there are some workround, biz i can't reproduce this problem.

  1. renderContent can custom your overlay display.
  2. LightBox add a style {{ flex: 1 }}.

i hope it can help you

fukemy commented 2 years ago

hi, it's worked. THanks

sadia-onyxtec commented 1 year ago

sorry for late response, i think there are some workround, biz i can't reproduce this problem.

1. `renderContent ` can custom your overlay display.

2. LightBox add a style {{ flex: 1 }}.

i hope it can help you

It was not working but when I added flex:1 in activeProps, it worked fine.