开发者

my list view is not selectable

hi i make this tutorial http://techdroid.kbeanie.com/2009/07/custom-listview-for-android.html

but i can't select thi item in the listview..

how can i resolve this??

i don'y understand the comments on the blog..

maybe the problem are in here

ListView list = (ListView)findViewById(R.id.ListView_addConta);
    DBAdapter db = new DBAdapter(Contas.this);      
    db.open();    开发者_如何学编程  
    List<Conta> listOfConta = db.getContas();        
    ContaAdapter adapter = new ContaAdapter(this, listOfConta);        
    list.setAdapter(adapter);


Extend ListActivity instead of Activity, and override the onListItemClick method. This way works best for me.

This is a good tutorial: http://www.vogella.de/articles/AndroidListView/article.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜