Re: [android-beginners] My first post -- ArrayAdapter question

2010-06-15 Thread Nam Ngo
Hi,

You notice that the ArrayAdapter will have to populate a view for each
row of a list view, thus you must provide it a layout for the row, you
can either specify a layout of your own (R.layout.row) or just use the
framework's built in layout (android.R.layout...).
You can find an example in the ApiDemo,

Regards,
Nam

On Fri, 2010-06-11 at 22:00 -0700, appsgrrl wrote:
> Hi all,  this is my first post, and I'm just starting out, so it will
> probably be stoopid.
> 
> I'm trying to use the ArrayAdatper(Context, int textViewResourceId,
> Listobjects) constructor.
> 
> What resourceId am I supposed to use for the second parameter?
> 
> I want this to apply this ArrayAdapter to a Spinner, and when I tried
> using the Id of the Spinner,  I got a dump in the log, some of which
> is : android.content.res.Resources$NotFoundException: Resource ID
> #0x7f070001 type #0x12 is not valid
> 
> Thanks
> 


-- 
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
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] My first post -- ArrayAdapter question

2010-06-12 Thread Yuvi
The textViewResourceId is actually the id of a layout (as it says on the
docs: "The resource ID for a layout file containing a TextView to use when
instantiating views.").
So you should have a layout with a single TextView and it should work.


On Sat, Jun 12, 2010 at 7:00 AM, appsgrrl  wrote:

> Hi all,  this is my first post, and I'm just starting out, so it will
> probably be stoopid.
>
> I'm trying to use the ArrayAdatper(Context, int textViewResourceId,
> Listobjects) constructor.
>
> What resourceId am I supposed to use for the second parameter?
>
> I want this to apply this ArrayAdapter to a Spinner, and when I tried
> using the Id of the Spinner,  I got a dump in the log, some of which
> is : android.content.res.Resources$NotFoundException: Resource ID
> #0x7f070001 type #0x12 is not valid
>
> Thanks
>
> --
> 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
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
YuviDroid
http://android.yuvalsharon.net

-- 
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
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] My first post -- ArrayAdapter question

2010-06-11 Thread appsgrrl
Hi all,  this is my first post, and I'm just starting out, so it will
probably be stoopid.

I'm trying to use the ArrayAdatper(Context, int textViewResourceId,
Listobjects) constructor.

What resourceId am I supposed to use for the second parameter?

I want this to apply this ArrayAdapter to a Spinner, and when I tried
using the Id of the Spinner,  I got a dump in the log, some of which
is : android.content.res.Resources$NotFoundException: Resource ID
#0x7f070001 type #0x12 is not valid

Thanks

-- 
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
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en