0
votes

I am having a hard time to display the image in an ImageView in titanium, I run the app in an emulator

Here is my .xml file code

<Alloy>
<Window class="container">
    <View id="view_image">
        <ImageView id="img_logo" />
    </View>
</Window>

And here is my .tss code

"#img_logo":{
width: '100%',
height: '100%',
image: '/images/storm_logo.png'

}

Please help me

2

2 Answers

1
votes

Quick fix would be to specify the image inside the imageView tag.

<Alloy>
<Window class="container">
    <View id="view_image">
        <ImageView id="img_logo" image='/images/storm_logo.png' />
    </View>
</Window>
0
votes

Where have you put your image?

The way you refer to the image via the id in the tss file seems Ok. It does the same as explained by Funtik

However, your image have to be in the directory: app/assets/images (as you are using Alloy). Is that the position of the image? Also, if the image is in that directory, check if it is 'Ok'. Does it show correctly if you double-click on it?