diff options
Diffstat (limited to 'app/src/main/java/se')
3 files changed, 23 insertions, 6 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java index ea328216..f0e2de85 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java @@ -1,16 +1,19 @@ package se.leap.bitmaskclient; import android.content.SharedPreferences; +import android.graphics.PorterDuff; +import android.os.Build; import android.os.Bundle; -import android.os.PersistableBundle; import android.support.annotation.DrawableRes; import android.support.annotation.Nullable; import android.support.annotation.StringRes; +import android.support.v4.content.ContextCompat; import android.support.v7.widget.AppCompatImageView; import android.support.v7.widget.AppCompatTextView; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; +import android.widget.ProgressBar; import butterknife.InjectView; @@ -38,6 +41,9 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity { @InjectView(R.id.loading_screen) protected LinearLayout loadingScreen; + @InjectView(R.id.progressbar) + protected ProgressBar progressBar; + @InjectView(R.id.progressbar_description) protected AppCompatTextView progressbarText; @@ -59,6 +65,7 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity { super.setContentView(view); if (provider != null) setProviderHeaderText(provider.getName()); + setProgressbarColorForPreLollipop(); } @Override @@ -66,6 +73,7 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity { super.setContentView(layoutResID); if (provider != null) setProviderHeaderText(provider.getName()); + setProgressbarColorForPreLollipop(); } @Override @@ -73,8 +81,18 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity { super.setContentView(view, params); if (provider != null) setProviderHeaderText(provider.getName()); + setProgressbarColorForPreLollipop(); } + private void setProgressbarColorForPreLollipop() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + progressBar.getIndeterminateDrawable().setColorFilter( + ContextCompat.getColor(this, R.color.colorPrimary), + PorterDuff.Mode.SRC_IN); + } + } + + @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java index 8d1fa03a..08622453 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java @@ -31,6 +31,7 @@ import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.support.v7.app.AlertDialog; import android.support.v7.widget.AppCompatImageView; +import android.support.v7.widget.AppCompatTextView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -84,10 +85,10 @@ public class EipFragment extends Fragment implements Observer { Button mainButton; @InjectView(R.id.routed_text) - TextView routedText; + AppCompatTextView routedText; @InjectView(R.id.vpn_route) - TextView vpnRoute; + AppCompatTextView vpnRoute; private EipStatus eipStatus; diff --git a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java index b7180f5f..6bbdeb4f 100644 --- a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java @@ -13,12 +13,10 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import de.blinkt.openvpn.core.VpnStatus; -import se.leap.bitmaskclient.eip.EIP; import se.leap.bitmaskclient.eip.EipCommand; import se.leap.bitmaskclient.userstatus.User; import static se.leap.bitmaskclient.Constants.APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE; -import static se.leap.bitmaskclient.Constants.EIP_ACTION_START; import static se.leap.bitmaskclient.Constants.EIP_RESTART_ON_BOOT; import static se.leap.bitmaskclient.Constants.PREFERENCES_APP_VERSION; import static se.leap.bitmaskclient.Constants.PROVIDER_EIP_DEFINITION; @@ -32,7 +30,7 @@ import static se.leap.bitmaskclient.MainActivity.ACTION_SHOW_VPN_FRAGMENT; * and acts and calls another activity accordingly. * */ -public class StartActivity extends Activity { +public class StartActivity extends Activity{ public static final String TAG = StartActivity.class.getSimpleName(); @Retention(RetentionPolicy.SOURCE) |