summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java5
2 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
index 4df568b9..d63d9c72 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
@@ -542,7 +542,7 @@ public class EipFragment extends Fragment implements Observer {
} else if (eipStatus.isBlocking()) {
setMainButtonEnabled(true);
mainButton.updateState(true, false, true);
- locationButton.setText(getString(R.string.no_location));
+ locationButton.setText(R.string.no_location);
locationButton.setLocationLoad(UNKNOWN);
locationButton.showBridgeIndicator(false);
locationButton.showRecommendedIndicator(false);
@@ -552,7 +552,7 @@ public class EipFragment extends Fragment implements Observer {
animateState(R.drawable.state_disconnected);
setActivityBarColor(R.color.bg_disconnected_top, R.color.bg_disconnected_top_light_transparent);
} else {
- locationButton.setText(getContext().getString(R.string.vpn_button_turn_on));
+ locationButton.setText(R.string.vpn_button_turn_on);
setMainButtonEnabled(true);
mainButton.updateState(false, false, false);
locationButton.setLocationLoad(UNKNOWN);
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java b/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java
index 7ad044bd..ae77d60e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java
@@ -8,6 +8,7 @@ import android.widget.RelativeLayout;
import androidx.annotation.ColorRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.StringRes;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.content.ContextCompat;
@@ -52,6 +53,10 @@ public class LocationButton extends RelativeLayout {
textView.setText(text);
}
+ public void setText(@StringRes int resId) {
+ textView.setText(resId);
+ }
+
public void showBridgeIndicator(boolean show) {
bridgeView.setVisibility(show ? VISIBLE : GONE);
}