-
-
Save parzibyte/b6c6b95c2513e21c4b2a3478a8323307 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int i) { | |
switch (holder.getItemViewType()) { | |
case TIPO_NORMAL: | |
ViewHolderGasto viewHolderGasto = (ViewHolderGasto) holder; | |
Gasto gasto = listaDeGastos.get(i); | |
viewHolderGasto.descripcion.setText(gasto.getDescripcion()); | |
viewHolderGasto.monto.setText(gasto.getMontoAsString()); | |
viewHolderGasto.categoria.setText(gasto.getCategoria().getNombre()); | |
viewHolderGasto.fecha.setText(gasto.getFechaFormateada()); | |
break; | |
case TIPO_VER_MAS: | |
default: | |
ViewHolderVerMas viewHolderVerMas = (ViewHolderVerMas) holder; | |
viewHolderVerMas.textoVerMas.getContext().getString(R.string.ver_todos_gastos); | |
viewHolderVerMas.textoVerMas.setText(viewHolderVerMas.textoVerMas.getContext().getString(R.string.ver_todos_gastos)); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment