Skip to content
Snippets Groups Projects
Commit 90d26b49 authored by Christian Dresen's avatar Christian Dresen
Browse files

Added Prices to Products

parent afa1efc1
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,9 @@ public class ProductDialog extends Dialog implements View.OnClickListener { ...@@ -44,7 +44,9 @@ public class ProductDialog extends Dialog implements View.OnClickListener {
prodButton.setHeight(200); prodButton.setHeight(200);
prodButton.setWidth(200); prodButton.setWidth(200);
prodButton.setGravity(0); prodButton.setGravity(0);
prodButton.setText(p.getName()); String placeholder = "\n\n\n\n\n\n";
placeholder = placeholder.substring(Integer.valueOf(p.getName().length() / 16));
prodButton.setText(p.getName()+placeholder+String.valueOf(p.getPrice())+" Euro");
prodButton.setOnClickListener(this); prodButton.setOnClickListener(this);
this.gridProducts.addView(prodButton); this.gridProducts.addView(prodButton);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment