@Test(expected = UnsupportedOperationException.class) public void testOnBindDropDownViewHolderWithoutDropDownHolderBinder() { final TestAdapter adapter = new TestAdapter(context); adapter.onBindDropDownViewHolder(new ViewHolder(new View(context)), 0); }
@SuppressWarnings("unchecked") protected void onBindDropDownViewHolder(@NonNull final DVH viewHolder, final int position) { if (dropDownHolderBinder == null) { onBindViewHolder((VH) viewHolder, position); } else { this.dropDownHolderBinder.bindHolder((A) this, viewHolder, position, Collections.EMPTY_LIST); } }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") protected void onBindDropDownViewHolder(@NonNull final DVH viewHolder, final int position) { if (dropDownHolderBinder == null) { onBindViewHolder((VH) viewHolder, position); } else { this.dropDownHolderBinder.bindHolder((A) this, viewHolder, position, Collections.EMPTY_LIST); } } }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") protected void onBindDropDownViewHolder(@NonNull final DVH viewHolder, final int position) { if (dropDownHolderBinder == null) { onBindViewHolder((VH) viewHolder, position); } else { this.dropDownHolderBinder.bindHolder((A) this, viewHolder, position, Collections.EMPTY_LIST); } } BaseSpinnerAdapter(@NonNull final Context context); }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") protected void onBindDropDownViewHolder(@NonNull final DVH viewHolder, final int position) { if (dropDownHolderBinder == null) { onBindViewHolder((VH) viewHolder, position); } else { this.dropDownHolderBinder.bindHolder((A) this, viewHolder, position, Collections.EMPTY_LIST); } } BaseSpinnerAdapter(@NonNull final Context context); void setDropDownHolderFactory(@Nullable final AdapterHolder.Factory<DVH> factory); @Nullable AdapterHolder.Factory<DVH> getDropDownHolderFactory(); void setDropDownHolderBinder(@Nullable final AdapterHolder.Binder<A, DVH> binder); @Nullable AdapterHolder.Binder<A, DVH> getDropDownHolderBinder(); @Nullable I getSelectedItem(); int getSelectedPosition(); @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @SuppressWarnings("unchecked") @Override View getDropDownView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") protected void onBindDropDownViewHolder(@NonNull final DVH viewHolder, final int position) { if (dropDownHolderBinder == null) { onBindViewHolder((VH) viewHolder, position); } else { this.dropDownHolderBinder.bindHolder((A) this, viewHolder, position, Collections.EMPTY_LIST); } } BaseSpinnerAdapter(@NonNull final Context context); void setDropDownHolderFactory(@Nullable final AdapterHolder.Factory<DVH> factory); @Nullable AdapterHolder.Factory<DVH> getDropDownHolderFactory(); void setDropDownHolderBinder(@Nullable final AdapterHolder.Binder<A, DVH> binder); @Nullable AdapterHolder.Binder<A, DVH> getDropDownHolderBinder(); @Nullable I getSelectedItem(); int getSelectedPosition(); @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @SuppressWarnings("unchecked") @Override View getDropDownView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent);  }