Here is a nice example that you can refer to.
http://blog.pocketjourney.com/2008/05/02/android-tutorial-42-passing-custom-variables-via-xml-resource-files/

There is also an official sample which I guess needs a bit of modification
(I am not sure, don't remember)
It's in the samples of the API level 8. the class is called
CustomView1.java. You will have to find the related xmls from the samples
folder.


Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 2:41 AM, Albert Rosa <[email protected]> wrote:

> Afternoon All,
>
> I am working on trying to streamline my app a bit and i want to get
> the most out of my custom view and the xml layout.
>
> So I have a custom object with 4 images and a textview in the whole
> view, I have created functions to inject the images I want to use in
> code, but I am looking to do something like the following:
>
> <customView
>    image1Property.src ='img;/>
>
> I may not be too clear and for that I apologize for now.
>
> All I want to do is populate a child view form a parent view more or
> less ...but in the xml and not by the setup code.
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
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

Reply via email to