add some colors

This commit is contained in:
tibbi 2016-06-01 17:12:43 +02:00
parent cf3d54753c
commit f7ae519d04
5 changed files with 8 additions and 6 deletions

View File

@ -2,7 +2,7 @@ package com.simplemobiletools.calendar;
public class Constants {
public static final float LOW_ALPHA = .2f;
public static final float HIGH_ALPHA = .9f;
public static final float HIGH_ALPHA = .8f;
public static final String PREFS = "prefs";
public static final String WIDGET_BG_COLOR = "widget_bg_color";

View File

@ -74,13 +74,13 @@ public class MyWidgetConfigure extends AppCompatActivity implements Calendar {
todayTextSize /= res.getDisplayMetrics().density;
final SharedPreferences prefs = initPrefs(this);
textColorWithoutTransparency = prefs.getInt(Constants.WIDGET_TEXT_COLOR, Color.WHITE);
textColorWithoutTransparency = prefs.getInt(Constants.WIDGET_TEXT_COLOR, getResources().getColor(R.color.colorPrimary));
updateTextColors();
bgColor = prefs.getInt(Constants.WIDGET_BG_COLOR, 1);
if (bgColor == 1) {
bgColor = Color.BLACK;
bgAlpha = .5f;
bgAlpha = .2f;
} else {
bgAlpha = Color.alpha(bgColor) / (float) 255;
}

View File

@ -50,6 +50,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-light"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:text="OK"

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorPrimary">#ffff6f00</color>
<color name="colorPrimaryDark">#ffe46300</color>
<color name="colorAccent">@color/colorPrimary</color>
<color name="dark_grey_pressed_mask">#11000000</color>
<color name="lightGrey">#08000000</color>
</resources>

View File

@ -11,6 +11,7 @@
<style name="DayView">
<item name="android:gravity">center</item>
<item name="android:textSize">@dimen/day_text_size</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="MyWidgetConfigTheme" parent="@style/AppTheme">