@Test public void testGetViewOnEmptyWrapper() { final AdapterWrapper wrapper = new AdapterWrapper(null); for (int i = 0; i < 20; i++) { assertThat(wrapper.getView(0, null, container), is(nullValue())); } }
@Override public View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent) { return adapter == null ? null : adapter.getView(position, convertView, parent); }
AdapterWrapper implements WrapperListAdapter { @Override public View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent) { return adapter == null ? null : adapter.getView(position, convertView, parent); } }
AdapterWrapper implements WrapperListAdapter { @Override public View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent) { return adapter == null ? null : adapter.getView(position, convertView, parent); } AdapterWrapper(@Nullable final ListAdapter adapter); }
AdapterWrapper implements WrapperListAdapter { @Override public View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent) { return adapter == null ? null : adapter.getView(position, convertView, parent); } AdapterWrapper(@Nullable final ListAdapter adapter); @Override @Nullable ListAdapter getWrappedAdapter(); @Override void registerDataSetObserver(@NonNull final DataSetObserver observer); @Override void unregisterDataSetObserver(@NonNull final DataSetObserver observer); @Override boolean isEmpty(); @Override int getCount(); @Override @Nullable Object getItem(final int position); @Override boolean hasStableIds(); @Override long getItemId(final int position); @Override int getViewTypeCount(); @Override int getItemViewType(final int position); @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @Override boolean areAllItemsEnabled(); @Override boolean isEnabled(final int position); }
AdapterWrapper implements WrapperListAdapter { @Override public View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent) { return adapter == null ? null : adapter.getView(position, convertView, parent); } AdapterWrapper(@Nullable final ListAdapter adapter); @Override @Nullable ListAdapter getWrappedAdapter(); @Override void registerDataSetObserver(@NonNull final DataSetObserver observer); @Override void unregisterDataSetObserver(@NonNull final DataSetObserver observer); @Override boolean isEmpty(); @Override int getCount(); @Override @Nullable Object getItem(final int position); @Override boolean hasStableIds(); @Override long getItemId(final int position); @Override int getViewTypeCount(); @Override int getItemViewType(final int position); @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @Override boolean areAllItemsEnabled(); @Override boolean isEnabled(final int position);  }