这是创建适配器和填充列表的代码。我还给出了列表包含的值。
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.two_line_list_item, android.R.id.text1, temp);
// temp is list
lst.setAdapter(adapter);
我认为我在列表结构中遇到的问题与 listview 不兼容请提供有效的方法来做到这一点 temp 中的值是
12-01 10:58:51.161: I/System.out(521): list has value [
12-01 10:58:51.161: I/System.out(521): asdfasdf
12-01 10:58:51.161: I/System.out(521): asdf
12-01 10:58:51.161: I/System.out(521): cat5
12-01 10:58:51.180: I/System.out(521): asdf
12-01 10:58:51.180: I/System.out(521): ,
12-01 10:58:51.190: I/System.out(521): asdf
12-01 10:58:51.190: I/System.out(521): fdf
12-01 10:58:51.190: I/System.out(521): cat5
12-01 10:58:51.190: I/System.out(521): zxcv
12-01 10:58:51.200: I/System.out(521): ,
12-01 10:58:51.200: I/System.out(521): dasdasd
12-01 10:58:51.200: I/System.out(521): adsd
12-01 10:58:51.200: I/System.out(521): cat3
12-01 10:58:51.200: I/System.out(521): asdf
12-01 10:58:51.200: I/System.out(521): ,
12-01 10:58:51.200: I/System.out(521): sad
12-01 10:58:51.200: I/System.out(521): de
12-01 10:58:51.200: I/System.out(521): cat1
12-01 10:58:51.200: I/System.out(521): asdf
12-01 10:58:51.210: I/System.out(521): ,
12-01 10:58:51.210: I/System.out(521): asdasd
12-01 10:58:51.210: I/System.out(521): asd
12-01 10:58:51.210: I/System.out(521): cat2
12-01 10:58:51.210: I/System.out(521): zxcv
12-01 10:58:51.210: I/System.out(521): ,
12-01 10:58:51.210: I/System.out(521): asdasdf
12-01 10:58:51.210: I/System.out(521): fdsfsdfdfsf
12-01 10:58:51.210: I/System.out(521): cat4 +
12-01 10:58:51.210: I/System.out(521): zxcv
12-01 10:58:51.210: I/System.out(521): ]