Android examples for java.lang:Double
Format float value to Percent String
import android.text.TextUtils; import java.util.Locale; import java.util.UUID; public class Main{ public static String getPercentString(float percent) { return String.format(Locale.US, "%d%%", (int) (percent * 100)); }//from w w w .j a v a 2s. c o m }