Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image always rendering on top of its content #7

Open
davidsamacoits opened this issue Jul 3, 2017 · 2 comments
Open

Image always rendering on top of its content #7

davidsamacoits opened this issue Jul 3, 2017 · 2 comments

Comments

@davidsamacoits
Copy link

davidsamacoits commented Jul 3, 2017

Hi, thank you for your work. I'm really interesting in your plugin but unfortunately it's not working as expected.
I have the following structure :
<TouchableOpacity> <ImageLoad source={imageSrc} > <Image source={require('../../../assets/img/cardgradient.png')} style={Styles.gradientImage} > <View style={Styles.ShowCard.titleContainer}> <View style={Styles.ShowCard.titleLayout}> <Text style={Styles.ShowCard.title}>{title}</Text> <Text style={Styles.ShowCard.genres}>{genres}</Text> </View> </View> </Image> </ImageLoad> </TouchableOpacity>
The main idea is to have a Touchable component with a picture inside, a gradient on top of it and some texts.
But when your ImageLoad component renders, it renders on top of my other components.
Any idea why?

@TuNguyenThanh
Copy link
Owner

Thank @davidsamacoits for your issues.
Bug occurred because of "styles" inside ImageLoad component.
I updated the new version.

ex:

<ImageLoad
   style={{ flex: 1 }}
   loadingStyle={{ size: 'large', color: 'blue' }}
   source={{uri: 'https://4.bp.blogspot.com/-lYq2CzKT12k/VVR_atacIWI/AAAAAAABiwk/ZDXJa9dhUh8/s0/Convict_Lake_Autumn_View_uhd.jpg'}}
>
    <View style={{ flex: 1, backgroundColor: 'transparent' }}>
        <Text>ImageLoad</Text>
    </View>
</ImageLoad>

Note: backgroundColor: 'transparent' is required.

@davidsamacoits
Copy link
Author

I'm sorry but it's still not working. It's duplicating the content of my ImageLoad tag.

My code :
code

Using imageLoad tags :
with imageload tag

Using regular image tags :
with image tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants