From 4d9018316fa5a9af714de44224a440e0fa78be57 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 31 Jul 2023 17:50:04 +0200 Subject: add cancel button, call provider stetup command in ConfigureProviderFragment and listen to the result, implementing happy path --- .../se/leap/bitmaskclient/base/views/ProgressSpinner.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/base/views') diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/ProgressSpinner.java b/app/src/main/java/se/leap/bitmaskclient/base/views/ProgressSpinner.java index b0b81624..380ddf23 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/views/ProgressSpinner.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/views/ProgressSpinner.java @@ -48,6 +48,16 @@ public class ProgressSpinner extends RelativeLayout { } public void update(int progress) { - textView.setText(textView.getContext().getString(R.string.percentage, progress)); + String text = ""; + if (progress > 0) { + if ((progress / 10) == 0) { + text = text + " "; + } + if ((progress / 100) == 0) { + text = text + " "; + } + text = text + progress + "%"; + } + textView.setText(text); } } -- cgit v1.2.3