Top 10 Mobile App Development Company in Pune 2026 | Top Picks
Pune has earned its place as one of India’s most reliable technology destinations. It is not as chaotic as Mumbai or as expensive as Bangalore. Instead, Pune offers a perfect […]
The getView() method of the class extending the BaseAdapter holds the state of the currently displayed view which is invalidated when scrolling the listview. So, in order to avoid this problem, proceed in the following manner.
• Create a nested class within the class (class which is extending BaseAdapter Class), namely, Viewholder.
• Declare all the views of an individual list item in this Viewholder Class.
• Create an object of this Viewholder class in the getView() method and initialize all the views declared in the Viewholder class using this object.
Example :
Activity activity;
publicclassViewHolder{
TextViewtextview;
CheckBoxcheckbox;
}
public View getView(finalint position, View convertView, ViewGroup parent)
{
View vi=convertView;
LayoutInflaterinflater = activity.getLayoutInflater();
vi = inflater.inflate (R.layout.listitem, null);
ViewHolder item=newViewHolder();
item.textview = (TextView)vi.findViewById(R.id.textview1);
item.checkbox = (CheckBox)vi.findViewById(R.id.checkbox1);
vi.setTag(item);
return vi;
}
Implement this and check the state of the checkbox while scrolling the listview.
Apr 21st, 2026
Pune has earned its place as one of India’s most reliable technology destinations. It is not as chaotic as Mumbai or as expensive as Bangalore. Instead, Pune offers a perfect […]
Apr 16th, 2026
Let us be honest for a moment. Nobody truly enjoys doing laundry. It is repetitive, time-consuming, and somehow never fully done. But what if your customers could outsource this entire […]
Apr 9th, 2026
In 2026, a mobile application is no longer just an option—it is a necessity. Whether you run a small local shop or a large enterprise, your customers expect to find […]