Skip to content

Instantly share code, notes, and snippets.

@ibrahimyilmaz
Created August 22, 2020 11:10
Show Gist options
  • Save ibrahimyilmaz/68d36b1938637e5cfeccb03444b3140b to your computer and use it in GitHub Desktop.
Save ibrahimyilmaz/68d36b1938637e5cfeccb03444b3140b to your computer and use it in GitHub Desktop.
public final class TransactionUtils {
public static String getTransactionWithFormattedTime(final Transaction transaction) {
String transactionTime = transaction.getTransactionTime();
return SomeFormattings(transactionTime);
}
}
//Lets say we are in the ViewHolder of a RecyclerView.Adapter
public void onBindViewHolder(...){
transactionTime.setText(TransactionUtils.getTransactionWithFormattedTime(transaction.getTransactionTime()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment