Hi Ashok,
This error means, you have to use ArrayAdapter which will be parameterized.
so you can use like this:
ArrayAdapter<CharSequence> Adapter1 = ArrayAdapter.createFromResource(
this, R.array.abcd, android.this,R.layout.list_row,list);
In this case, create array.xml also .
Tnaks,
Dolan.
On Wed, Jun 25, 2008 at 4:46 PM, Ashok Singal <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am new to the Android world.
>
> I am trying to run following piece of code in the SDK :
>
>
> *public* *void* onCreate(Bundle icicle) {
>
> *.......*
>
> String sMenuItems[] = {"Menu Item1", "Menu Item2", "Menu Item3"};
>
> List<String> list = Arrays.*asList*(sMenuItems);
>
> ArrayAdapter aListAdapter = *new* ArrayAdapter(*this*,R.layout.*list_row*
> ,list);
>
> setListAdapter(aListAdapter);
>
> }
>
> here layout of list_row is a single TextView view only.
>
> But it is returning me an error that references to generic type
> ArrayAdapter <T> should be parameterized. What does this error means and is
> there any other way to display a simple menu of some static entries?
>
> Can anybody please help me on this?
>
> Thanks and regards,
>
> Ashok
>
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---