Is it possible to calculate with numbers in the listView?
<p>I am working on <code>ShoppingList</code> project which holds information about amount of items and its price. The thing is that I kept them all into one array Shopping list&lt;>. So now when I use <code>AlertDialog</code> Builder and input for example: 
1 pc. Banana 25 eur. </p>

<p>I am not able to reach price, which I need to calculate final price of the products.</p>

<p>AlertDialog info:</p>

<p><a href="https://i.stack.imgur.com/IbhiN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IbhiN.png" alt="enter image description here"></a></p>

<p>How it looks so far:</p>

<p><a href="https://i.stack.imgur.com/tJUb4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tJUb4.png" alt="enter image description here"></a></p>

<p>This is a code which handles price amount: </p>

<pre><code>if (id == R.id.action_add)
    {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Fill out the fields");
        final EditText amount = new EditText(this);
        final EditText Item = new EditText(this);
        final EditText price = new EditText(this);
        amount.setHint("Input amount..");
        Item.setHint("Input item.. ");
        price.setHint("Input price.. ");
        LinearLayout layout = new LinearLayout(getApplicationContext());
        layout.setOrientation(LinearLayout.VERTICAL);
        amount.setRawInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED);
        price.setRawInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED);
        layout.addView(amount);
        layout.addView(Item);
        layout.addView(price);
        builder.setView(layout);
        builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

                shoppingList.add("   " + amount.getText()+ " pc. " + "     "+Item.getText().toString()+ "     " + price.getText().toString() + " Dkk");
                Collections.sort(shoppingList);
                storeArrayVal(shoppingList, getApplicationContext());

                lv.setAdapter(adapter);
            }
        });
        builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.cancel();
            }
        });
        builder.show();
        return true;

    }
</code></pre>

<p>Underneath, I am trying to make and function which should summarize all inputed amounts. This is what i have so far</p>

<p>if (id == R.id.action_sum)
        {</p>

<pre><code>        Context context = getApplicationContext();
        CharSequence text = "Total amount here";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, text, duration);
        toast.show();



    }
</code></pre>