The Context / AttributeSet constructor is used when a view is inflated from
XML.
For creating a view {subclass} from code, you can make any constructor that
makes sense - it should be passed a Context, most likely won't have an
AttributeSet (since that comes from XML), and can have any other parameters
as necessary.
-- Kostya
2011/6/12 TreKing <[email protected]>
> On Fri, Jun 10, 2011 at 12:16 PM, c0dege3k <[email protected]> wrote:
>
>> I have a class in my app that extends View, and I need to pass in the
>> Context and AttributeSet parameters, but I don't know what to use. So,
>> IS there a way to make a view without using the findViewById method?
>>
>
> Your question does not make a ton of sense. You should elaborate.
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>
> --
> 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