Hi All,

I am not an expert in Java and i'm rather new to Android development as well.

I am unable to extract the double value from a string... here is my code..

            String str;
            double amount;
            final EditText txtAmount = (EditText) findViewById(R.id.entryAmount);
            str = txtAmount.getText().toString();

            amount = (double)str;
//            amount =   parseDouble(str);
I tried to cast by (double) and tried parseDouble. None of my trials are working.

Can you help?


Is it a wrong location. Now I think I should posted a level below. But not able to remove !!