diff options
author | Fup Duck <fupduck@sacknagel.com> | 2018-02-25 16:05:39 +0100 |
---|---|---|
committer | Fup Duck <fupduck@sacknagel.com> | 2018-02-25 16:05:39 +0100 |
commit | 0fac81767d2d48a5fe28c29e4ca6c4742fe62637 (patch) | |
tree | 4fcc47118f63bd5d5dcde5803fd3703df55c1bfc /app/src/main | |
parent | 0bf176d8e925c71be7853c67f7c8b57d58df0ce3 (diff) | |
parent | 45065d30e0f2c61ca654587bab765959fdf4931f (diff) |
Merge branch '0xacab_0.9.8' into 8865_cancel_without_internet
Diffstat (limited to 'app/src/main')
7 files changed, 35 insertions, 33 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 f80d15e7..7c61ddae 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/ProviderListBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java index 3bf51a8c..75fffaf7 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java @@ -369,12 +369,6 @@ public abstract class ProviderListBaseActivity extends ConfigWizardBaseActivity } } - @Override - public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.configuration_wizard_activity, menu); - return true; - } - public class ProviderAPIBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { 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) diff --git a/app/src/main/res/layout-xlarge/eip_service_fragment.xml b/app/src/main/res/layout-xlarge/eip_service_fragment.xml index b7af5797..c09bda2d 100644 --- a/app/src/main/res/layout-xlarge/eip_service_fragment.xml +++ b/app/src/main/res/layout-xlarge/eip_service_fragment.xml @@ -54,7 +54,7 @@ app:srcCompat="@drawable/ic_colorsquare" /> - <TextView + <android.support.v7.widget.AppCompatTextView android:id="@+id/eipLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -65,6 +65,7 @@ android:layout_marginRight="@dimen/stdpadding" android:text="@string/eip_service_label" android:textAppearance="?android:attr/textAppearanceMedium" + android:gravity="center" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -97,7 +98,7 @@ style="@style/BitmaskButtonBlack" /> - <TextView + <android.support.v7.widget.AppCompatTextView android:id="@+id/routed_text" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -107,12 +108,13 @@ android:layout_marginLeft="@dimen/stdpadding" android:layout_marginRight="@dimen/stdpadding" android:text="@string/vpn_securely_routed" + android:gravity="center" android:visibility="visible" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/eipLabel" /> - <TextView + <android.support.v7.widget.AppCompatTextView android:id="@+id/vpn_route" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -120,6 +122,7 @@ android:layout_marginStart="@dimen/stdpadding" android:layout_marginLeft="@dimen/stdpadding" android:layout_marginRight="@dimen/stdpadding" + android:gravity="center" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/routed_text" /> diff --git a/app/src/main/res/layout/eip_service_fragment.xml b/app/src/main/res/layout/eip_service_fragment.xml index 814ec310..30b94de9 100644 --- a/app/src/main/res/layout/eip_service_fragment.xml +++ b/app/src/main/res/layout/eip_service_fragment.xml @@ -52,7 +52,7 @@ app:srcCompat="@drawable/ic_colorsquare" /> - <TextView + <android.support.v7.widget.AppCompatTextView android:id="@+id/eipLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -63,6 +63,7 @@ android:layout_marginRight="@dimen/stdpadding" android:text="@string/eip_service_label" android:textAppearance="?android:attr/textAppearanceMedium" + android:gravity="center" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -97,7 +98,7 @@ style="@style/BitmaskButtonBlack" /> - <TextView + <android.support.v7.widget.AppCompatTextView android:id="@+id/routed_text" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -107,12 +108,13 @@ android:layout_marginLeft="@dimen/stdpadding" android:layout_marginRight="@dimen/stdpadding" android:text="@string/vpn_securely_routed" + android:gravity="center" android:visibility="visible" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/eipLabel" /> - <TextView + <android.support.v7.widget.AppCompatTextView android:id="@+id/vpn_route" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -120,6 +122,7 @@ android:layout_marginStart="@dimen/stdpadding" android:layout_marginLeft="@dimen/stdpadding" android:layout_marginRight="@dimen/stdpadding" + android:gravity="center" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/routed_text" /> diff --git a/app/src/main/res/menu/configuration_wizard_activity.xml b/app/src/main/res/menu/configuration_wizard_activity.xml deleted file mode 100644 index 21591547..00000000 --- a/app/src/main/res/menu/configuration_wizard_activity.xml +++ /dev/null @@ -1,15 +0,0 @@ -<menu xmlns:android="http://schemas.android.com/apk/res/android" > - - <item - android:id="@+id/about_leap" - android:orderInCategory="110" - android:title="@string/about"/> - - <item - android:id="@+id/new_provider" - android:orderInCategory="210" - android:title="@string/add_provider" - android:showAsAction="ifRoom|withText" - android:icon="@drawable/ic_menu_add" - /> -</menu>
\ No newline at end of file |