Emre A. Yavuz wrote: > "You can, but then the child is already added to the parent; you do not > need to add it yourself." > > I agree with you, but if you're not going to store this info in the > layout, the only option left seem to be refering it using its > "R.drawable.childview".
R.drawable.childview is a references to a Drawable resource (res/drawable) and is not a reference to a View in a layout. > How can you convert this, an integer, to a View > then ? Should I create an ImageView variable and use its > setImageresource() method ? Yes. Then you need to add that to some parent layout via addView() as previously described. > but will there be a casting problem in that case ? I do not understand this question. > The DDMS perspective in Eclipse doesn't tell me anything at all. I get a > message from the emulator saying that the application has stopped working. The DDMS perspective contains a panel(?) called LogCat, which will give you a stack trace when an exception occurs. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

