I have downloaded and parsed an XML file.  The file contained and "id"
and "name".  I want the "name" to be visible in a ListView but the id
to be hidden.  I am having trouble getting this working and have been
experimenting with ArrayAdapters and SimpleAdapters.  Below is what I
have so far.

                        listsArray = new ArrayList<HashMap<String,
String>>();
                        remoteListsAdapter = new SimpleAdapter(
                                        getApplicationContext(),
                                        listsArray,
                                        android.R.layout.simple_list_item_1,
                                        new String[] { "id","name" },
                                        new int[] { android.R.id.text2 , 
android.R.id.text1} );

                        //Custom view to hold the id for the item in the 
setTag() method
                        remoteListsAdapter.setViewBinder(new ViewBinder() {

                                @Override
                                public boolean setViewValue(View view, Object 
data,
                                                String textRepresentation) {

                                         //Maybe I can to somethig in
here like setTag etc.

                                        return false;
                                }
                        });

I add items to the listsArray later on when parsing the XML file.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to