Correct.

Since Android is not true Java, you can't call methods of one object from
another object.

An unfortunate limitation that is hopefully fixed some day (version 19.0?
Peppermint Pattie?)

</tongue firmly planted in cheek>

You can call some methods of the activity from the adapter, or you can pass
some information from the activity into the adapter, or come up with some
other way.

I assure you, styling list view items based on some logic is definitely
possible. Just look at the Gmail app on your phone, for a start.

-- Kostya

5 января 2012 г. 22:43 пользователь John Davis <[email protected]> написал:

> On Thu, Jan 5, 2012 at 12:44 PM, Kostya Vasilyev <[email protected]>
> wrote:
> > Ok, great.
> >
> > One simple thing you can do is to check the item's position, e.g. set odd
> > items to blue and even items to red (just to pick an example).
>
> The only logic which knows the desired color is the main view which
> populated the list view.  It seems that android can not do what I
> desire.
>
>

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