[android-developers] Re: how to make each item in ListView has different layout ?

2009-05-21 Thread quanghuytruongd...@gmail.com
Ooops, and of course: projectList.setAdapter(new CustomListAdapter (YourActivity.this)); On May 22, 11:36 am, stonestrange wrote: > hi, > I am trying to have a list in my app. In the list,there are two > columns,the first is DbAdapter.KEY_ID,and the second is > DbAdapter.KEY_PROJECT. That is ev

[android-developers] Re: how to make each item in ListView has different layout ?

2009-05-21 Thread quanghuytruongd...@gmail.com
Create a new class (can be named for ex CustomListAdapter) that extends BaseAdapter, and do your customized in "public View getView (int position, View convertView, ViewGroup parent)". Ex: @Override public View getView(int position, View convertView, ViewGroup parent) { Tex