What 'putIntExtra'? There is a getIntExtra, there is a putExtra, but I
don't see a 'putIntExtra'.

Besides: surely the type conversion rules of Java guarantee that he is
calling putExtra(String, int) here.

On Jul 7, 9:38 pm, Yousuf Faheem <[email protected]> wrote:
> Hi,
>
> Use putIntExtra instead of putExtra()
>
> Thanks & Regards,
> Yousuf Syed
>
> On Wed, Jul 7, 2010 at 7:44 PM, Traveler <[email protected]> wrote:
> > I am a relative newbie to Android and am trying to learn how to pass
> > an int value to another activity.
>
> > Main activity uses a ListView. The following onitemClick method is
> > supposed to communicate the
> > position value to the playalphabet activity.
>
> > public void onItemClick(AdapterView<?> a, View v, int position, long
> > id) {
> >    Intent intent = new Intent(v.getContext(),
> >        playalphabet.class);
> >    intent.putExtra("selections", position);
> >    startActivityForResult(intent, 0);
> > }
>
> > When a button click is detected in the playalphabet activity, it is
> > supposed to retrieve the
> > position value, but position is always zero.
>
> > Any advice is appreciated.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > [email protected]<android-beginners%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to