here is the code:
public View getView(int position, View convertView, ViewGroup parent) {
LinearLayout ll;
LayoutInflater vi;
if (convertView == null)
{
ll=new LinearLayout(this._c);
String inflater = Context.LAYOUT_INFLATER_SERVICE;
vi = (LayoutInflater)this._c.getSystemService(inflater);
vi.inflate(R.layout.contact_list_row, ll, true);
}
else
{
ll = (LinearLayout)convertView;
}
TextView tv =(TextView)ll.findViewById(R.id.name);
tv.setText(ml.getString1());
tv =(TextView)ll.findViewById(R.id.phoneNo);
tv.setText(ml.getString2());
CheckBox check=(CheckBox)ll.findViewById(R.id.check);
final numberDatabase nd=new numberDatabase(ml.getContext());
nd.setListType(ml.getIntegerValue1());
Log.i("number exists",ml.getString1());
if(nd.numberExists(ml.getString2()))
{
//Log.i("number exists",ml.getString2());
//check.setChecked(true);
}
else
{
//Log.i("number not exists",ml.getString2());
//check.setChecked(false);
}
}