java - Is this the right way to add 2 arrays into SimpleAdapter -


i use simpleadapter display 2 strings, 1 on left , other on right, listview,

the strings in 2 different arrays. , 1st array 1st in array b in 1st line, , on..

here part of code use:

    string[] array= getresources().getstringarray(r.array.names_list);      int lengthtmp= array.length;     for(int i=0;i<lengthtmp;i++)     {         counter++;         addtolist(array[i]);                 }      adapter = new simpleadapter(this,list,r.layout.start_row,new string[] {"number","suraname"},new int[] {r.id.start_numbering,r.id.start_name});      private void addtolist(string name) {     hashmap<string,string> temp = new hashmap<string,string>();       temp.put("number", integer.tostring(sortingpictures[counter-1]));      temp.put("suraname", name);     list.add(temp);  } 

i'm sure there better way make want. can suggest correct way?

thanks.

no not proper way implementing here given link read id , idea implementing it.

http://www.heikkitoivonen.net/blog/2009/02/15/multicolumn-listview-in-android/

i hope helpful you.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -