React-native-ui-kitten: Image rkCardImg doesn't work

Created on 3 Jul 2017  路  6Comments  路  Source: akveo/react-native-ui-kitten

I've tried code from examples:

<RkCard>
        <View rkCardHeader>
          <Text>Header</Text>
        </View>
        <Image rkCardImg source={require('../img/sea.jpg')}/>
        <View rkCardContent>
          <Text> quick brown fox jumps over the lazy dog</Text>
        </View>
        <View rkCardFooter>
          <Text>Footer</Text>
        </View>
</RkCard>

But image doesn't shown on the screen. See screenshot

2017-07-03 14 52 17

But if I set style={{width: 200, height: 200}} and remove rkCardImg attribute for Image element - it appears on the screen. Probably something wrong with processing of rkCardImg attribute

Bug

Most helpful comment

my workaround is to set flex to 0:

    RkTheme.setType('RkCard', 'story', {
        img: {
            flex: 0,
            height: 100,
            opacity: 0.7
        },

All 6 comments

Hello

I tried reproduce that behavior but on android and ios your example works correctly.

I have following styles for <Image>:
image

After some research I understand that the problem is useless style flex: 1 for image, we will fix it in next release

Did you fix the bug?

my workaround is to set flex to 0:

    RkTheme.setType('RkCard', 'story', {
        img: {
            flex: 0,
            height: 100,
            opacity: 0.7
        },

Hi @ventskus-roman, @jbaek7023 , @GregorHorvatH,

This issue was fixed in d22d195951ffe4b102c1a63b5ef356520da937f. The fix will be included into next release.

@sergey-kozel ~still having this issue in v3.0.0 from android only~ Nevermind, i had a typo in my code.

Was this page helpful?
0 / 5 - 0 ratings