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.
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.
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());