I figured out how to set the src in xml

android:src="*...@drawable*/*colorselector*"
I still have no idea why i cant set it at runtime though.

On Mon, Dec 22, 2008 at 11:50 AM, Josh <[email protected]> wrote:

>
> I forgot to mention that setting the image  in xml be fine for what im
> doing but I couldnt figure out how to do that either :(.
> Can someone point me to an example of an imageview with the image set
> in xml? I looked at the docs but I just dont get it.
>
>
> On Dec 22, 11:44 am, Josh <[email protected]> wrote:
> > I have an ImageView that I define in xml. When i try to set the image
> > resource the activity crashes. this is the syntax im using...
> >
> > imgColorSelector.setImageResource(R.drawable.colorselector);
> >
> > any ideas as to what im doing wrong?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to