Skip to content
Snippets Groups Projects
Commit 2ca89f8c authored by Fabio Heyming's avatar Fabio Heyming
Browse files

Userfriendly Itemadd

parent d74a3a90
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,15 @@ public class SupplierAddItemFragment extends Fragment {
toast.show();
}
else{
if (toast != null) {
toast.cancel(); // Vorhandene Toast-Nachricht abbrechen
}
toast = Toast.makeText(rootView.getContext(), R.string.addedItem, Toast.LENGTH_SHORT);
toast.show();
MampfMobil.currentSupplier.itemAdd(etName.getText().toString(), Integer.parseInt(etAmount.getText().toString()),Double.parseDouble(etPrice.getText().toString()));
etName.setText("");
etAmount.setText("");
etPrice.setText("");
}
}
......
......@@ -66,4 +66,5 @@
<string name="item_already_exists">Item existiert bereits</string>
<string name="added_to_shopping_cart">Zum Einkaufswagen hinzugefügt</string>
<string name="name">name</string>
<string name="addedItem">Item zum Shop hinzugefügt</string>
</resources>
\ No newline at end of file
......@@ -65,4 +65,5 @@
<string name="item_already_exists">Item already exists</string>
<string name="added_to_shopping_cart">Added to Shopping Cart</string>
<string name="name">Name</string>
<string name="addedItem">Added Item to Shop</string>
</resources>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment