mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-11 02:55:04 +00:00
Fix list price display
This commit is contained in:
@@ -370,7 +370,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver {
|
|||||||
if(!pNames.isEmpty()) {
|
if(!pNames.isEmpty()) {
|
||||||
name.setText(pNames.get(position));
|
name.setText(pNames.get(position));
|
||||||
store.setText(pStores.get(position));
|
store.setText(pStores.get(position));
|
||||||
if (Double.parseDouble(pPrices.get(position)) * Double.parseDouble(pQuantity.get(position)) < 0) {
|
if (Double.parseDouble(pPrices.get(position)) * Double.parseDouble(pQuantity.get(position)) <= 0) {
|
||||||
price.setText(String.format("$%s", pPrices.get(position)));
|
price.setText(String.format("$%s", pPrices.get(position)));
|
||||||
} else {
|
} else {
|
||||||
price.setText(String.format("$%s ($%.2f)", pPrices.get(position), Double.parseDouble(pPrices.get(position)) * Double.parseDouble(pQuantity.get(position))));
|
price.setText(String.format("$%s ($%.2f)", pPrices.get(position), Double.parseDouble(pPrices.get(position)) * Double.parseDouble(pQuantity.get(position))));
|
||||||
|
|||||||
Reference in New Issue
Block a user