Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Alloy: Conditionally Display ImageView

$
0
0

I have an imageview defined in a view as such:

<View id="body">
            <Label id="questiontxt" text="Question:  {$.questionObj.questiontext}"/>
            <ImageView id="questionimg" image="{$.questionObj.questionimage}"></ImageView>
            <Button id="addScore" onClick="incScore">Add to score</Button>
        </View>
However sometimes questionimage is blank and in those cases I dont want to show the view at all. What is the most appropriate way to handle this situation? Do I just hide the image view in the controller using the visible attribute? Is there some other way to method that is more appropriate?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>