I defined the XML file and attributes, and can read the values from the
attributes.
But still there is another issue,
   How can I set the values in MyActivity?

Thanks,
Mike

On Wed, Apr 6, 2011 at 2:37 PM, Zsolt Vasvari <[email protected]> wrote:

> Use custom attributes in the layout XML.  You can declare them in
> attrs.xml.
>
> On Apr 6, 1:48 pm, "[email protected]" <[email protected]>
> wrote:
> > Hello Guys,
> >
> > I defined a customer view, e.g. MyView, which need to be constructed
> > with some own parameter, e.g. line number in the view, an integer.
> > The view will be employed by my activity, MyActivity.
> > It seems that the View's constructors are fixed and will be called by
> > the system, and I can do nothing on it.
> >
> > The question is:
> >          How to pass the integer to the view during construction from
> > the activity, while I've known the integer in MyActivity?
> >
> > Thanks in advance.
> > Mike
>
> --
> 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

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