mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
interlude
This commit is contained in:
@@ -23,11 +23,11 @@ import static org.briarproject.api.crypto.PasswordStrengthEstimator.WEAK;
|
||||
public class StrengthMeter extends ProgressBar {
|
||||
|
||||
private static final int MAX = 100;
|
||||
private static final int RED = Color.rgb(255, 0, 0);
|
||||
private static final int ORANGE = Color.rgb(255, 160, 0);
|
||||
private static final int YELLOW = Color.rgb(255, 255, 0);
|
||||
private static final int LIME = Color.rgb(180, 255, 0);
|
||||
private static final int GREEN = Color.rgb(0, 255, 0);
|
||||
public static final int RED = Color.rgb(255, 0, 0);
|
||||
public static final int ORANGE = Color.rgb(255, 160, 0);
|
||||
public static final int YELLOW = Color.rgb(255, 255, 0);
|
||||
public static final int LIME = Color.rgb(180, 255, 0);
|
||||
public static final int GREEN = Color.rgb(0, 255, 0);
|
||||
|
||||
private final ShapeDrawable bar;
|
||||
|
||||
@@ -57,6 +57,10 @@ public class StrengthMeter extends ProgressBar {
|
||||
return MAX;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return bar.getPaint().getColor();
|
||||
}
|
||||
|
||||
public void setStrength(float strength) {
|
||||
if (strength < 0 || strength > 1) throw new IllegalArgumentException();
|
||||
int colour;
|
||||
|
||||
Reference in New Issue
Block a user