/* ---------- ListView delegate methods ----------
761279
public void setAdapter(StickyListHeadersAdapter adapter) {
        if (adapter == null) {
            if (mAdapter instanceof SectionIndexerAdapterWrapper) {
                ((SectionIndexerAdapterWrapper) mAdapter).mSectionIndexerDelegate = null;
            }
            if (mAdapter != null) {
                mAdapter.mDelegate = null;
            }
            mList.setAdapter(null);
            clearHeader();
            return;
        }
        if (mAdapter != null) {
            mAdapter.unregisterDataSetObserver(mDataSetObserver);
        }

        if (adapter instanceof SectionIndexer) {
            mAdapter = new SectionIndexerAdapterWrapper(getContext(), adapter);
        } else {
            mAdapter = new AdapterWrapper(getContext(), adapter);
        }
        mDataSetObserver = new AdapterWrapperDataSetObserver();
        mAdapter.registerDataSetObserver(mDataSetObserver);

        if (mOnHeaderClickListener != null) {
            mAdapter.setOnHeaderClickListener(new AdapterWrapperHeaderClickHandler());
        } else {
            mAdapter.setOnHeaderClickListener(null);
        }

        mAdapter.setDivider(mDivider, mDividerHeight);

        mList.setAdapter(mAdapter);
        clearHeader();
    }
1351070
function ListView_setAriaSelected(itemElement, isSelected) {
                    var ariaSelected = (itemElement.getAttribute("aria-selected") === "true");

                    if (isSelected !== ariaSelected) {
                        itemElement.setAttribute("aria-selected", isSelected);
                    }
                }
373390
@Override public final void onBindViewHolder(VH holder, int position) {
    if (isHeaderPosition(position)) {
      onBindHeaderViewHolder(holder, position);
    } else if (isFooterPosition(position)) {
      onBindFooterViewHolder(holder, position);
    } else {
      onBindItemViewHolder(holder, position);
    }
  }
830302
public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener l) {
        if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE)
            return;
        ((AutoCompleteTextView)mInputView).setOnItemSelectedListener(l);
    }
555646
public SwipeActionAdapter setListView(ListView listView){
        this.mListView = listView;
        mTouchListener = new SwipeActionTouchListener(listView,this);
        this.mListView.setOnTouchListener(mTouchListener);
        this.mListView.setOnScrollListener(mTouchListener.makeScrollListener());
        this.mListView.setClipChildren(false);
        mTouchListener.setFadeOut(mFadeOut);
        mTouchListener.setDimBackgrounds(mDimBackgrounds);
        mTouchListener.setFixedBackgrounds(mFixedBackgrounds);
        mTouchListener.setNormalSwipeFraction(mNormalSwipeFraction);
        mTouchListener.setFarSwipeFraction(mFarSwipeFraction);
        return this;
    }
509775
private void initializeList() {
    mListView = (ListView) findViewById(R.id.drawer_list);
    mListAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
    mListView.setAdapter(mListAdapter);
    mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
      @Override
      public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
        mFragmentSwitcher.setCurrentItem(position);
        mDrawerLayout.closeDrawer(Gravity.START);
      }
    });
  }
691217
@Override
    protected void doActionsInEventThread() {
        if (component instanceof ComboBox) {
            ((ComboBox<?>) component).getSelectionModel().select(mIndex);
        } else if (component instanceof ListView) {
            ((ListView<?>) component).getSelectionModel().select(mIndex);
        }
    }
1360861
@Override
    public void bindView(SimpleImageItem.ViewHolder viewHolder, List<Object> payloads) {
        super.bindView(viewHolder, payloads);

        //get the context
        Context ctx = viewHolder.itemView.getContext();

        //define our data for the view
        viewHolder.imageName.setText(mName);
        viewHolder.imageDescription.setText(mDescription);
        viewHolder.imageView.setImageBitmap(null);

        //set the background for the item
        int color = UIUtils.getThemeColor(ctx, R.attr.colorPrimary);

        viewHolder.view.clearAnimation();
        viewHolder.view.setForeground(FastAdapterUIUtils.getSelectablePressedBackground(ctx, FastAdapterUIUtils.adjustAlpha(color, 100), 50, true));

        //load glide
        Glide.clear(viewHolder.imageView);
        Glide.with(ctx).load(mImageUrl).animate(R.anim.alpha_on).into(viewHolder.imageView);
    }
862641
@Override
  public void onBindViewHolder(@NonNull final TodoItemViewHolder holder, final int position) {
    final TodoItem item = todoItems.get(position);

    holder.taskTextView.setText(item.getTask());
    holder.taskCheckbox.setChecked(item.getChecked());
  }
1327273
protected void onItemLongClick(View view, int position){
        if(itemLongClickListener != null) itemLongClickListener.onItemLongClick(view, getItem(position), position);
    }
591383
public void setPersistenceDelegate(Class<?> type, PersistenceDelegate delegate)
	{
		if (type == null || delegate == null)
		{
			throw new NullPointerException();
		}
		delegates.put(type, delegate);
	}
235030
public void setDelegates(java.util.Collection<Delegate> delegates) {
        if (delegates == null) {
            this.delegates = null;
            return;
        }

        this.delegates = new java.util.ArrayList<Delegate>(delegates);
    }
1004946
public void setListAdapter(ListAdapter adapter) {
        boolean hadAdapter = mAdapter != null;
        mAdapter = adapter;
        if (mList != null) {
            mList.setAdapter(adapter);
            if (!mListShown && !hadAdapter) {
                // The list was hidden, and previously didn't have an
                // adapter.  It is now time to show it.
                setListShown(true, getView().getWindowToken() != null);
            }
        }
    }
202587
private void initViewListeners() {
		this.mNextButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(final View v) {
				if (ItemizedOverlayControlView.this.mLis != null)
					ItemizedOverlayControlView.this.mLis.onNext();
			}
		});

		this.mPreviousButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(final View v) {
				if (ItemizedOverlayControlView.this.mLis != null)
					ItemizedOverlayControlView.this.mLis.onPrevious();
			}
		});

		this.mCenterToButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(final View v) {
				if (ItemizedOverlayControlView.this.mLis != null)
					ItemizedOverlayControlView.this.mLis.onCenter();
			}
		});

		this.mNavToButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(final View v) {
				if (ItemizedOverlayControlView.this.mLis != null)
					ItemizedOverlayControlView.this.mLis.onNavTo();
			}
		});
	}
1002852
@Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        ensureList();
    }
754885
public void addDelegate (PlaceManagerDelegate delegate)
    {
        if (_delegates == null) {
            _delegates = Lists.newArrayList();
        }
        if (_omgr != null) {
            delegate.init(this, _omgr, _invmgr);
            delegate.didInit(_config);
        }
        _delegates.add(delegate);
    }
758053
private void initializeInstructionListRecyclerView() {
    RouteUtils routeUtils = new RouteUtils();
    instructionListAdapter = new InstructionListAdapter(routeUtils, distanceFormatter);
    rvInstructions.setAdapter(instructionListAdapter);
    rvInstructions.setHasFixedSize(true);
    rvInstructions.setLayoutManager(new LinearLayoutManager(getContext()));
  }