2
我有ArrayList,它将加载简单的xml textview作为项目。在TextView中我有drawableleft,但我无法弄清楚,如何改变这个图像?在适配器或?因为现在有办法在字符串列表中插入可绘制对象。TextView在ListView中更改DrawableLeft
我有一个像负荷项目:
items = new ArrayList<String>();
items.add(Some String item);
这是适配器
ArrayAdapter<String> List = new ArrayAdapter<String>(this, R.layout.item_text, items);
ListView mylist = (ListView) findViewById(android.R.id.list);
mylist.setAdapter(List);
和我的TextView项目
<TextView
android:id="@+id/item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawableLeft="@drawable/folder"
android:drawableEnd="@drawable/next" >
</TextView>
是的,它工作正常。如果有人需要我可以显示代码方法 –
我需要看代码。 –