use of us.koller.cameraroll.adapter.main.viewHolder.SimpleAlbumHolder in project Camera-Roll-Android-App by kollerlukas.
the class MainAdapter method onCreateViewHolder.
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
RecyclerView.ViewHolder viewHolder;
Resources res = parent.getContext().getResources();
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
if (viewType == res.getInteger(R.integer.STYLE_PARALLAX_VALUE)) {
View v = inflater.inflate(R.layout.album_cover_parallax, parent, false);
viewHolder = new SimpleAlbumHolder(v);
} else if (viewType == res.getInteger(R.integer.STYLE_CARDS_VALUE)) {
View v = inflater.inflate(R.layout.album_cover_card, parent, false);
viewHolder = new SimpleAlbumHolder(v);
} else if (viewType == res.getInteger(R.integer.STYLE_CARDS_2_VALUE)) {
View v = inflater.inflate(R.layout.album_cover_card_2, parent, false);
viewHolder = new SimpleAlbumHolder(v);
} else /*if (viewType == res.getInteger(R.integer.STYLE_NESTED_RECYCLER_VIEW_VALUE))*/
{
View v = inflater.inflate(R.layout.album_cover_nested_recyclerview, parent, false);
viewHolder = new NestedRecyclerViewAlbumHolder(v).setSelectorModeManager(getSelectorManager());
}
Context context = viewHolder.itemView.getContext();
Theme theme = Settings.getInstance(context).getThemeInstance(context);
ThemeableActivity.checkTags((ViewGroup) viewHolder.itemView, theme);
return viewHolder;
}
Aggregations