Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 3, 2019 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/ce0230ee4e6036ce677eeab2e0699da0 to your computer and use it in GitHub Desktop.
Save parzibyte/ce0230ee4e6036ce677eeab2e0699da0 to your computer and use it in GitHub Desktop.
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
switch (viewType) {
case TIPO_VER_MAS:
View filaVerMas = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.fila_ver_mas, viewGroup, false);
return new ViewHolderVerMas(filaVerMas);
case TIPO_NORMAL:
default:
View filaGasto = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.fila_gasto, viewGroup, false);
return new ViewHolderGasto(filaGasto);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment