mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
add some colors
This commit is contained in:
@@ -2,7 +2,7 @@ package com.simplemobiletools.calendar;
|
|||||||
|
|
||||||
public class Constants {
|
public class Constants {
|
||||||
public static final float LOW_ALPHA = .2f;
|
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 PREFS = "prefs";
|
||||||
public static final String WIDGET_BG_COLOR = "widget_bg_color";
|
public static final String WIDGET_BG_COLOR = "widget_bg_color";
|
||||||
|
@@ -74,13 +74,13 @@ public class MyWidgetConfigure extends AppCompatActivity implements Calendar {
|
|||||||
todayTextSize /= res.getDisplayMetrics().density;
|
todayTextSize /= res.getDisplayMetrics().density;
|
||||||
|
|
||||||
final SharedPreferences prefs = initPrefs(this);
|
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();
|
updateTextColors();
|
||||||
|
|
||||||
bgColor = prefs.getInt(Constants.WIDGET_BG_COLOR, 1);
|
bgColor = prefs.getInt(Constants.WIDGET_BG_COLOR, 1);
|
||||||
if (bgColor == 1) {
|
if (bgColor == 1) {
|
||||||
bgColor = Color.BLACK;
|
bgColor = Color.BLACK;
|
||||||
bgAlpha = .5f;
|
bgAlpha = .2f;
|
||||||
} else {
|
} else {
|
||||||
bgAlpha = Color.alpha(bgColor) / (float) 255;
|
bgAlpha = Color.alpha(bgColor) / (float) 255;
|
||||||
}
|
}
|
||||||
|
@@ -50,6 +50,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/activity_margin"
|
||||||
android:text="OK"
|
android:text="OK"
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#3F51B5</color>
|
<color name="colorPrimary">#ffff6f00</color>
|
||||||
<color name="colorPrimaryDark">#303F9F</color>
|
<color name="colorPrimaryDark">#ffe46300</color>
|
||||||
<color name="colorAccent">#FF4081</color>
|
<color name="colorAccent">@color/colorPrimary</color>
|
||||||
<color name="dark_grey_pressed_mask">#11000000</color>
|
<color name="dark_grey_pressed_mask">#11000000</color>
|
||||||
<color name="lightGrey">#08000000</color>
|
<color name="lightGrey">#08000000</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
<style name="DayView">
|
<style name="DayView">
|
||||||
<item name="android:gravity">center</item>
|
<item name="android:gravity">center</item>
|
||||||
<item name="android:textSize">@dimen/day_text_size</item>
|
<item name="android:textSize">@dimen/day_text_size</item>
|
||||||
|
<item name="android:fontFamily">sans-serif-light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MyWidgetConfigTheme" parent="@style/AppTheme">
|
<style name="MyWidgetConfigTheme" parent="@style/AppTheme">
|
||||||
|
Reference in New Issue
Block a user