I have created an customListview
where i have inserted an button..now on click of that button
i want to start new activity
..how that can be done the code for creating custom listview
is given below..can anyone tell me how i interact with that button to start a new activity
..
code:
public static class ViewHolder
{
Button butAddNew;
TextView txtViewHeading;
TextView txtViewTitle;
TextView txtViewDescription;
}
public View getView(int position, View convertView, ViewGroup parent)
{
ViewHolder holder;
if(convertView==null)
{
holder = new ViewHolder();
convertView = inflater.inflate(R.layout.histryfrm_listview, null);
holder.butAddNew =(Button) convertView.findViewById(R.id.butAddNew);
holder.txtViewTitle =(TextView) convertView.findViewById(R.id.txtViewTitle);
holder.txtViewDescription =(TextView) convertView.findViewById(R.id.txtViewDescription);
holder.txtViewHeading =(TextView) convertView.findViewById(R.id.txtViewHeading);
convertView.setTag(holder);
}
else
holder=(ViewHolder)convertView.getTag();
holder.txtViewTitle.setText(title[position]);
holder.txtViewDescription.setText(description[position]);
holder.txtViewHeading.setText(heading[position]);
return convertView;
}
}