Good day,
I have in this interface where in the EditTex marked in red is a value that I want to leave fixed after I request it once
From this activity I send it to another activity2 where I have this structure.
Bundle bundle = getIntent().getExtras();
if(bundle !=null) {
uni =bundle.getString("u");
}
to collect the uni data, in that same activity I have a method where I use that variable
String miunidades=uni;
int valorUnidad = Integer.parseInt(miunidades);
I convert it because it comes in String and then I perform the operation
if(suma == 1){
valorUnidad=valorUnidad+0;
}if(suma==2) {
valorUnidad = valorUnidad + 2;
}if(suma==3){
valorUnidad=valorUnidad+2;
}
textViewcalculo.setText("Dosis: "+valorUnidad);
And that value I do not want to re-start the application because I need it to be cumulative and save it and take that again and continue the operation.
Thanks