android - ViewHolder not working(one more repeating) -


Custom Adapters list, click View problem Reiterating response items. InClick is a method for actually clicking on an element of the clicked element, and if I scroll down my list then some element repeats it.
when I tried to resolve it with the tag so it does not help me I can not separate recovery would try to use that help stack and get on Google but also. This is my lust code of recovery

  The public class extends the CAChanal Bidderator {Personal reference reference; Protected MainActivity MAcontext; Public Cachanal (MainActivity _context) {MAcontext = _context; } Public Cachanal (reference reference) {this.context = context; } ArrayList & lt; DMCanaal & gt; ListArray; Public Cachanal () {listArray = new ArrayList & lt; DMCanaal & gt; (); } @ Override Public In Receipt () {Return to list.rea;); } @OverWide Public Object Hot Itam (Int'l) {Return ListEray.Gate (I); } @ Override Public Long ITMID (Int'l) {Return Return; } @ Override Public View GetView (Int Index, View View, ViewGroup Parent) {Final Viewholder Holder; If (see == empty) {layout inflator inflator = layoutinflator.fr (parent.getContext ()); See = inflater.inflate (R.Lailout.national_template, empty); Holder = new viewholder (); Holder.chanalElement = (ChanalView) view.findViewById (R.id.chanalView_forList); View.setTag (holder); } Else {holder = (viewholder) view.getTag (); } Holder.chanalElement.setOnClickListener (New OnClickListener () {@Override see public void onClick (v) {if (holder.chanalElement.getChanalStatus ()) {holder.chanalElement.enableChanal () ;!} Else {holder.chanalElement.disableChanal ();}}}); Return view; } Fixed class viewer {Chanelview Chanel element; } Public object getFilter () {return tap; }}  

Does anyone can help me solve my problem and explain what my code could be wrong PS: ChanalView my custom view

< / div>

  public class MyAdapter extends BaseAdapter {list of & lt; DMCanaal & gt; ListArray; & Lt; Boolean & gt; ChanalElementStates = New Arrestists & lt; Boolean & gt; (); ... @ override public view getView (last ins index, view view, see group origin) {final viewholder holder; If (see == empty) {layout inflator inflator = layoutinflator.fr (parent.getContext ()); See = inflater.inflate (R.Lailout.national_template, empty); Holder = new viewholder (); Dharkkcikitskelement = (Chanl view) Drishykfindwubiaiaidi (Arkdiknanlwu_forist); View.setTag (holder); } Else {holder = (viewholder) view.getTag (); } Holder.chanalElement.setOnClickListener (New OnClickListener) {@Override Public Zero onClick (see v) {Boolean enabled = chanalElementStates [index];; ChanalElementStates [index] = enabled; updateEnabledState (holder, enabled);}}); // What were you remember, you have to always reset the state what you want because ideas are recycled. Update enabled state (holder, chanalElementStates [index]); Return view; } Private Zero Update enabled state (seeholder holder, Boolean enabled) {if (enabled) holder. Classic Element.Anneal Customer (); Other Holder Classic Element Disabled (); }}  

Comments