I want to display the arrayList items in ListView which is having 2 different textViews. I am using ListViewCustomAdapter and getView(),getItem()... methods are there.
your adapter getview is perfect, but your logic is wrong.. I would prefer making class object with 2 strings, like.
public class MyClass
{
String one;
String two;
}
and make your list like
ArrayList mylist = new ArrayList();
and then setText like you want.
TextView t1=(TextView)List.findViewById(R.id.txtViewTitle);
t1.setText(mylist.get(position).one); //String one= "a1" according to position in mylist
//it will be = "b1" on next position
//no need of casting to CharSequence
TextView t2=(TextView)List.findViewById(R.id.txtViewDescription);
t2.setText(mylist.get(position).two); //String two= "a2"