Save textview value in a variable

0

I have the following declared TextView:

TextView billChangeTV[0] = (TextView) parentView.findViewById(R.id.billChangeTabCash);

I wanted to know how I can save the value that appears here in a variable of type double.

Greetings.

    
asked by J. Burrueco 29.11.2018 в 13:15
source

1 answer

0

Basically you would have to get the TextView text with getText() and then transform it to a Double with Double.parseDouble(String)

TextView billChangeTV[0] = (TextView) parentView.findViewById(R.id.billChangeTabCash);
Double respuesta = Double.parseDouble(billChangeTV[0].getText());
    
answered by 29.11.2018 / 17:48
source