java - access to another XML file -
i want have access xml file in inner class can't reference other xml components, inner class code:
class itemsclass extends arrayadapter<string> { public itemsclass () { super(listactivity.this, r.layout.itemslist); } public view getview (final int position, view convertview, viewgroup parent) { //setcontentview(r.layout.itemslist); final string s = this.getitem(position); layoutinflater inflater= getlayoutinflater(); view row= inflater.inflate(r.layout.itemslist, parent, false); // ref each component in itemlist.xml textview itemname= (textview) row.findviewbyid(r.id.textview1);// here can't access textview in itemslist.xml } }
view row= inflator.inflate(r.layout.itemslist, null);
read http://www.vogella.de/articles/androidlistview/article.html
Comments
Post a Comment