@Test(expected = UnsupportedOperationException.class) public void testOnCreateDropDownViewHolderWithoutDropDownHolderFactory() { final TestAdapter adapter = new TestAdapter(context); adapter.onCreateDropDownViewHolder(container, 0); }
@SuppressWarnings("unchecked") @NonNull protected DVH onCreateDropDownViewHolder(@NonNull final ViewGroup parent, final int viewType) { return dropDownHolderFactory == null ? (DVH) onCreateViewHolder(parent, viewType) : dropDownHolderFactory.createHolder(parent, viewType); }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") @NonNull protected DVH onCreateDropDownViewHolder(@NonNull final ViewGroup parent, final int viewType) { return dropDownHolderFactory == null ? (DVH) onCreateViewHolder(parent, viewType) : dropDownHolderFactory.createHolder(parent, viewType); } }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") @NonNull protected DVH onCreateDropDownViewHolder(@NonNull final ViewGroup parent, final int viewType) { return dropDownHolderFactory == null ? (DVH) onCreateViewHolder(parent, viewType) : dropDownHolderFactory.createHolder(parent, viewType); } BaseSpinnerAdapter(@NonNull final Context context); }
BaseSpinnerAdapter extends BaseListAdapter<A, VH, I> { @SuppressWarnings("unchecked") @NonNull protected DVH onCreateDropDownViewHolder(@NonNull final ViewGroup parent, final int viewType) { return dropDownHolderFactory == null ? (DVH) onCreateViewHolder(parent, viewType) : dropDownHolderFactory.createHolder(parent, viewType); } 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") @NonNull protected DVH onCreateDropDownViewHolder(@NonNull final ViewGroup parent, final int viewType) { return dropDownHolderFactory == null ? (DVH) onCreateViewHolder(parent, viewType) : dropDownHolderFactory.createHolder(parent, viewType); } 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);  }