java - Only one of my array adapters will work at a time in my row -
i have 2 textfields in row, , i'm using array adapters assign text. however, 1 of them work @ time. if comment 1 out, other work, , vice versa. doing wrong here , how can make work properly?
private void getfiles() { names = new arraylist<string>(); times = new arraylist<string>(); path = new arraylist<string>(); file f = new file(getstring(r.string.file_path)); file[] files = f.listfiles(); for(int i=0; < files.length; i++) { file file = files[i]; path.add(file.getpath()); names.add(file.getname()); charsequence relativetime = dateutils.getrelativetimespanstring(file.lastmodified()); times.add((string) relativetime); } arrayadapter<string> messagesenders = new arrayadapter<string>(this, r.layout.list_item, r.id.message_name, names); arrayadapter<string> messagetimes = new arrayadapter<string>(this, r.layout.list_item, r.id.message_time, times); setlistadapter(messagesenders); setlistadapter(messagetimes); }
Comments
Post a Comment