True vdhielko, I was passing 2nd parameter as 0 and hence the issue.
The message looked to me like it was looking for resource x0 etc.. I
used                                    android.R.layout.simple_list_item_1 
this as param then it
worked.

Regards,
Nagendra

On Mar 22, 9:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> You certainly don't need to use ArrayAdapter.createFromResource(). You
> can simply make a new array adapter using ArrayAdapter arrayAdapter =
> new ArrayAdapter(some args); This constructor can take an array or a
> list of objects, so you can read the array of data from your
> resources, modify it, and give it as an argument to the constructor.
>
> On Mar 22, 2:58 pm,RajaNagendraKumar<[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hi,
>
> > I am using AbstractList with
>
> > setListAdapter(updateArray(ArrayAdapter.createFromResource(this,
> >                                                                    menuList,
> >                                                                    
> > android.R.layout.simple_list_item_1)));
>
> > where menuList is a array resource id .
>
> > however, I need to read menuList array from the resource files and
> > slightly change on of the string content with details of current login
> > info etc.
>
> > e.g if the list has 'Change User' as string I need to convert it into
> > 'Change User (existing user id here)'
>
> > so that when the list is rendered the user would use Chage User(user1)
> > etc.
>
> > For that I wrapped ArrayAdapter.createFromResource() call with
> > updateArray() method which reads the resource array and creates new
> > arrayadopter. However when I use setListAdapter() with the
> > programatically modified array, the view fails saying that array
> > resource does not exist etc.
>
> > Could any one tell me what could be the issue here.. Does
> > setListAdapter() needs arrayadopters which are created by using
> > ArrayAdapter.createFromResource() only..
>
> > If yes, why is this limitation and any workarrounds..
>
> > Regards,
> >RajaNagendraKumar,
> > C.T.Owww.tejasoft.com- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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]
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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to