diff options
4 files changed, 28 insertions, 10 deletions
diff --git a/app/src/custom/res/values/custom-theme.xml b/app/src/custom/res/values/custom-theme.xml index 6c197915..7c4964e4 100644 --- a/app/src/custom/res/values/custom-theme.xml +++ b/app/src/custom/res/values/custom-theme.xml @@ -1,10 +1,14 @@  <?xml version="1.0" encoding="utf-8"?>  <resources>      <!--Colors--> -    <!--Color of the action bar-->      <color name="colorPrimary">#1565C0</color> -    <!--Color of the status bar-->      <color name="colorPrimaryDark">#104E95</color> +    <color name="colorPrimaryLight">@color/colorPrimary</color> + +    <!--Color of the action bar--> +    <color name="bg_setup_action_bar">@color/colorPrimary</color> +    <!--Color of the status bar--> +    <color name="bg_setup_status_bar">@color/colorPrimaryDark</color>      <!--Font color of the action bar title-->      <color name="colorActionBarTitleFont">#ffffff</color>      <!--Font color of the action bar subtitle--> diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/ActionBarTitle.java b/app/src/main/java/se/leap/bitmaskclient/base/views/ActionBarTitle.java index a151305e..3aa21ae9 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/views/ActionBarTitle.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/views/ActionBarTitle.java @@ -1,10 +1,11 @@  package se.leap.bitmaskclient.base.views;  import android.content.Context; +import android.graphics.Typeface; +import android.os.Build;  import android.util.AttributeSet;  import android.view.Gravity;  import android.view.LayoutInflater; -import android.widget.RelativeLayout;  import androidx.annotation.ColorInt;  import androidx.annotation.NonNull; @@ -90,7 +91,16 @@ public class ActionBarTitle extends LinearLayoutCompat {          actionBarTitle.setLayoutParams(titleLayoutParams);          actionBarSubtitle.setLayoutParams(subtitleLayoutParams);          container.setLayoutParams(containerLayoutParams); +    } - +    public void setSingleBoldTitle() { +        showSubtitle(false); +        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { +            actionBarTitle.setTypeface(Typeface.create(null,900,false)); +        } else { +            actionBarTitle.setTypeface(actionBarTitle.getTypeface(), Typeface.BOLD); +        } +        actionBarTitle.setLetterSpacing(0.05f); +        actionBarTitle.setTextSize(24f);      }  } diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/SetupActivity.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/SetupActivity.java index 57b648f4..7881459f 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/SetupActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/SetupActivity.java @@ -161,16 +161,17 @@ public class SetupActivity extends AppCompatActivity implements SetupActivityCal          ActionBarTitle actionBarTitle = new ActionBarTitle(context);          actionBarTitle.setTitleCaps(BuildConfig.actionbar_capitalize_title);          actionBarTitle.setTitle(getString(R.string.app_name)); -        actionBarTitle.showSubtitle(false);          final Drawable upArrow = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_back, getTheme());          actionBar.setHomeAsUpIndicator(upArrow);          actionBar.setDisplayHomeAsUpEnabled(ProviderObservable.getInstance().getCurrentProvider().isConfigured()); +        ViewHelper.setActivityBarColor(this, R.color.bg_setup_status_bar, R.color.bg_setup_action_bar, R.color.colorActionBarTitleFont);          @ColorInt int titleColor = ContextCompat.getColor(context, R.color.colorActionBarTitleFont);          actionBarTitle.setTitleTextColor(titleColor);          actionBarTitle.setCentered(BuildConfig.actionbar_center_title); +        actionBarTitle.setSingleBoldTitle();          if (BuildConfig.actionbar_center_title) {              ActionBar.LayoutParams params = new ActionBar.LayoutParams(                      ActionBar.LayoutParams.WRAP_CONTENT, diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 132ddae8..10d802cd 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,8 +1,9 @@  <?xml version="1.0" encoding="utf-8"?>  <resources> -    <color name="colorPrimary">#FF69B4</color> -    <color name="colorPrimaryDark">#ff1b8b</color> -    <color name="colorPrimary_transparent">#20000000</color> +    <color name="colorPrimary">#ff1b8b</color> +    <color name="colorPrimaryLight">#FF69B4</color> +    <color name="colorPrimaryDark">#ef0072</color> +    <color name="colorPrimary_transparent">#0B000000</color>      <color name="colorBackground">#fffafafa</color>      <color name="colorError">#ef9a9a</color>      <color name="colorSuccess">#a5d6a7</color> @@ -41,8 +42,8 @@      <!-- button text colors in Alerts etc. -->      <color name="color_font_btn">@color/black800</color>      <!-- pill style button text colors --> -    <color name="color_font_btn_primary">@color/black800</color> -    <color name="color_font_btn_secondary">@color/black800</color> +    <color name="color_font_btn_primary">@color/white</color> +    <color name="color_font_btn_secondary">@color/white</color>      <color name="colorLocationButtonTint">@color/black</color>      <color name="colorLocationButtonTintTransparent">@color/black800_high_transparent</color>      <color name="colorWarning">#B33A3A</color> @@ -65,6 +66,8 @@      <color name="bg_running">#CCDCB8</color>      <!-- actionbar and status bar colors for different connection states --> +    <color name="bg_setup_action_bar">@color/colorPrimary</color> +    <color name="bg_setup_status_bar">@color/colorPrimaryDark</color>      <color name="bg_disconnected_top">#EC6767</color>      <color name="bg_disconnected_top_light_transparent">#CCff9895</color>      <color name="bg_connecting_top">#FADD85</color>  | 
