我正在尝试将文本视图动态添加到列表视图,如下所示。我看到列表视图中出现了项目,但它们显示如下
android.widget.TextView@44f076d0
android.widget.TextView@44f07b58
android.widget.TextView@44f07f50
etc...
ArrayList<TextView> tv = new ArrayList<TextView>();
for(int i=0; i < 10; i++){
TextView t = new TextView(this);
t.setText("hi there");
tv.add(t);
}
ArrayAdapter<TextView> wordAdapter = new ArrayAdapter<TextView>(this,
android.R.layout.simple_list_item_1, android.R.id.text1,
tv);
this.articleListView.setAdapter(wordAdapter);