Last active
April 26, 2016 09:16
-
-
Save up1/bfa175694d859fb831e2216c5b6fef95 to your computer and use it in GitHub Desktop.
Android :: SRP
This file contains hidden or 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(ViewHolder holder, int position) { | |
| Order order = items.get(position); | |
| holder.orderNumber.setText(order.getOrderNumber().toString()); | |
| holder.orderTotal.setText(order.getOrderTotal()); | |
| holder.itemView.setTag(order); | |
| } |
This file contains hidden or 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(ViewHolder holder, int position) { | |
| Order order = items.get(position); | |
| holder.orderNumber.setText(order.getOrderNumber().toString()); | |
| long total = 0; | |
| for (LineItem item : order.getItems()) { | |
| total += item.getPrice(); | |
| } | |
| Locale thai = ... | |
| NumberFormat formatter = NumberFormat.getCurrencyInstance(thai); | |
| String totalValue = formatter.format(total/100); | |
| holder.orderTotal.setText(totalValue) | |
| holder.itemView.setTag(order); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment