The typo is definitely there.

Toast.makeText(parent.getContext()),
     "The planet is " + parent.getItemAtPosition(pos).toString(), Toast.
LENGTH_LONG).show();
There should be just one closing paren after getContext, not two - closing
that method call, with the comma after it continuing the makeText()
parameter list.

-- Kostya

2011/6/23 rich friedel <[email protected]>

> You're kidding right?
>
> Toast.makeText takes 3 parameters, not 1.
> You just listed the THREE params that makeText() takes
>
>    1. The first parameter is a context which parent.getContext() returns
>    2. The next is a string, which is "The planet is " +
>    parent.getItemAtPosition(pos).**toString()
>    3.  The third is a number which is supplied by Toast.LENGTH_LONG
>
>  --
> 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