mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 01:28:52 -06:00
Fix colors in About screen
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package org.isoron.uhabits;
|
package org.isoron.uhabits;
|
||||||
|
|
||||||
|
import android.app.ActionBar;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@@ -42,11 +43,12 @@ public class AboutActivity extends Activity implements View.OnClickListener
|
|||||||
|
|
||||||
setContentView(R.layout.about);
|
setContentView(R.layout.about);
|
||||||
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= 21)
|
if (android.os.Build.VERSION.SDK_INT >= 21 && !UIHelper.isNightMode())
|
||||||
{
|
{
|
||||||
int color = getResources().getColor(R.color.blue_700);
|
int color = UIHelper.getStyledColor(this, R.attr.aboutScreenColor);
|
||||||
int darkerColor = ColorHelper.mixColors(color, Color.BLACK, 0.75f);
|
int darkerColor = ColorHelper.mixColors(color, Color.BLACK, 0.75f);
|
||||||
getActionBar().setBackgroundDrawable(new ColorDrawable(color));
|
ActionBar actionBar = getActionBar();
|
||||||
|
if(actionBar != null) actionBar.setBackgroundDrawable(new ColorDrawable(color));
|
||||||
getWindow().setStatusBarColor(darkerColor);
|
getWindow().setStatusBarColor(darkerColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:layout_margin="6dp"
|
android:layout_margin="6dp"
|
||||||
android:textColor="@color/blue_700"
|
android:textColor="?aboutScreenColor"
|
||||||
android:text="@string/app_name"/>
|
android:text="@string/app_name"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/CardHeader"
|
style="@style/CardHeader"
|
||||||
android:text="@string/links"
|
android:text="@string/links"
|
||||||
android:textColor="@color/blue_700"/>
|
android:textColor="?aboutScreenColor"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvRate"
|
android:id="@+id/tvRate"
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/CardHeader"
|
style="@style/CardHeader"
|
||||||
android:text="@string/developers"
|
android:text="@string/developers"
|
||||||
android:textColor="@color/blue_700"/>
|
android:textColor="?aboutScreenColor"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/About.Item"
|
style="@style/About.Item"
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
style="@style/CardHeader"
|
style="@style/CardHeader"
|
||||||
android:text="@string/translators"
|
android:text="@string/translators"
|
||||||
android:textColor="@color/blue_700"/>
|
android:textColor="?aboutScreenColor"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/About.Item"
|
style="@style/About.Item"
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
<item name="highContrastTextColor">@color/grey_800</item>
|
<item name="highContrastTextColor">@color/grey_800</item>
|
||||||
<item name="mediumContrastTextColor">@color/grey_500</item>
|
<item name="mediumContrastTextColor">@color/grey_500</item>
|
||||||
<item name="lowContrastTextColor">@color/grey_300</item>
|
<item name="lowContrastTextColor">@color/grey_300</item>
|
||||||
|
|
||||||
|
<item name="aboutScreenColor">@color/blue_700</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppBaseThemeDark" parent="android:Theme.Material">
|
<style name="AppBaseThemeDark" parent="android:Theme.Material">
|
||||||
@@ -73,6 +75,8 @@
|
|||||||
<item name="lowContrastReverseTextColor">@color/grey_300</item>
|
<item name="lowContrastReverseTextColor">@color/grey_300</item>
|
||||||
|
|
||||||
<item name="palette">@array/darkPalette</item>
|
<item name="palette">@array/darkPalette</item>
|
||||||
|
|
||||||
|
<item name="aboutScreenColor">@color/blue_300</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppBaseThemeDark.PureBlack">
|
<style name="AppBaseThemeDark.PureBlack">
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
<attr name="highlightedBackgroundColor" format="reference"/>
|
<attr name="highlightedBackgroundColor" format="reference"/>
|
||||||
<attr name="useHabitColorAsPrimary" format="boolean"/>
|
<attr name="useHabitColorAsPrimary" format="boolean"/>
|
||||||
<attr name="palette" format="reference"/>
|
<attr name="palette" format="reference"/>
|
||||||
|
<attr name="aboutScreenColor" format="reference"/>
|
||||||
|
|
||||||
<attr name="highContrastTextColor" format="reference"/>
|
<attr name="highContrastTextColor" format="reference"/>
|
||||||
<attr name="mediumContrastTextColor" format="reference"/>
|
<attr name="mediumContrastTextColor" format="reference"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user