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

> Hello Treking, Kostya, Romain-Guy,
>
> 01-05 14:57:39.308: E/AndroidRuntime(9183): Caused by:
> java.lang.ClassCastException: java.lang.String
> 01-05 14:57:39.308: E/AndroidRuntime(9183):     at
>
> net.skink.swtor.companion.SwtorCompanionActivity.setCompanions(SwtorCompanionActivity.java:118)
> 01-05 14:57:39.308: E/AndroidRuntime(9183):     at
>
> net.skink.swtor.companion.SwtorCompanionActivity.onCreate(SwtorCompanionActivity.java:62)
>
>
net.skink.swtor.companion -- is this your code by any chance?



> This looks like the getItemAtPosition is returning a string instead of
> a view.  Is this a list of views or a list of strings?
>

getItemAtPosition returns the data object at the specified position by
calling the list view adapter's getItem(). It's a convenience method.

So yes, in your case the return value would be a String.

It does not return the view for that item (for one thing, it may be
scrolled off the screen and not exist at the time).

Um, and I think a few ppl already mentioned it in this thread.

-- Kostya



>
> John
>
> On Thu, Jan 5, 2012 at 2:40 PM, Kostya Vasilyev <[email protected]>
> wrote:
> > That's the debugger's stack trace, not the logcat stack trace.
>

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