hello I have a little problem in the following code that I will show, and that is how I can do it so that my progress bar does not go from 0 to 100, but instead of me I take a variable to get the percentage annex the progressbar code and my operation code
//Progressbar
ObjectAnimator anim = ObjectAnimator.ofInt(pbarra,
"progress", 0, 100);//En vez del 100 quiero traer el porciento de la operacion para sacar el porcentaje como le hago
anim.setDuration(2000);
anim.setInterpolator(new DecelerateInterpolator());
//iniciamos el progressbar
anim.start();
//Operacion
float total = (float) (articulo * cantidad);
float total1 = (float) (inicio - total);
float porciento = (float) ((total1 / inicio) * 100);
String porcentaje = Float.toString(porciento);
tvporcentaje.setText(porcentaje);