more styles and options added and amount on picture-resource-files reduced

This commit is contained in:
rICTx-T1D 2020-10-09 14:50:41 +02:00 committed by mh
parent 86a66276e7
commit 6c23ba7547
10 changed files with 49 additions and 7 deletions

View file

@ -113,6 +113,7 @@ public class RICTxWF01 extends BaseWatchFace {
String displayStyle=sharedPrefs.getString("rictxwf01_frameStyle", "full"); String displayStyle=sharedPrefs.getString("rictxwf01_frameStyle", "full");
String displayFrameColor=sharedPrefs.getString("rictxwf01_frameColor", "red"); String displayFrameColor=sharedPrefs.getString("rictxwf01_frameColor", "red");
String displayFrameColorSaturation=sharedPrefs.getString("rictxwf01_frameColorSaturation", "500"); String displayFrameColorSaturation=sharedPrefs.getString("rictxwf01_frameColorSaturation", "500");
String displayFrameColorOpacity=sharedPrefs.getString("rictxwf01_frameColorOpacity", "1");
// Load image with shapes // Load image with shapes
String styleDrawableName = "rictxwf01_bg_" + displayStyle + "_" + displayFormatType; String styleDrawableName = "rictxwf01_bg_" + displayStyle + "_" + displayFormatType;
@ -123,7 +124,7 @@ public class RICTxWF01 extends BaseWatchFace {
} }
// set background-tint-color // set background-tint-color
if (displayStyle.equalsIgnoreCase("rainbow") || displayStyle.equalsIgnoreCase("none")) { if (displayFrameColor.equalsIgnoreCase("multicolor") || displayStyle.equalsIgnoreCase("none")) {
mShapesElements.setBackgroundTintList(null); mShapesElements.setBackgroundTintList(null);
} else { } else {
String strColorName =(( displayFrameColor.equals("white") || displayFrameColor.equals("black") )?displayFrameColor:displayFrameColor+"_"+displayFrameColorSaturation); String strColorName =(( displayFrameColor.equals("white") || displayFrameColor.equals("black") )?displayFrameColor:displayFrameColor+"_"+displayFrameColorSaturation);
@ -137,10 +138,13 @@ public class RICTxWF01 extends BaseWatchFace {
} }
} }
// set opacity of shapes
mShapesElements.setAlpha(Float.parseFloat(displayFrameColorOpacity));
} }
/* optimize font-size --> when date is off then increase font-size of time */ /* optimize font-size --> when date is off then increase font-size of time */
Boolean isShowDate = sharedPrefs.getBoolean("show_date", true); Boolean isShowDate = sharedPrefs.getBoolean("show_date", false);
if (!isShowDate) { if (!isShowDate) {
layoutView.findViewById(R.id.date_time).setVisibility(View.GONE); layoutView.findViewById(R.id.date_time).setVisibility(View.GONE);
mHour.setTextSize(62); mHour.setTextSize(62);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View file

@ -3,14 +3,14 @@
<string-array name="rictxwf01_styles_name"> <string-array name="rictxwf01_styles_name">
<item>@string/style_none</item> <item>@string/style_none</item>
<item>@string/style_minimal</item> <item>@string/style_minimal</item>
<item>@string/style_shape</item>
<item>@string/style_full</item> <item>@string/style_full</item>
<item>@string/style_rainbow</item>
</string-array> </string-array>
<string-array name="rictxwf01_styles_values"> <string-array name="rictxwf01_styles_values">
<item>none</item> <item>none</item>
<item>minimal</item> <item>minimal</item>
<item>shape</item>
<item>full</item> <item>full</item>
<item>rainbow</item>
</string-array> </string-array>
<string-array name="rictxwf01_color_name"> <string-array name="rictxwf01_color_name">
@ -34,6 +34,7 @@
<item>@string/color_name_gray</item> <item>@string/color_name_gray</item>
<item>@string/color_name_bluegray</item> <item>@string/color_name_bluegray</item>
<item>@string/color_name_white</item> <item>@string/color_name_white</item>
<item>@string/color_name_multicolor</item>
</string-array> </string-array>
<string-array name="rictxwf01_color_values"> <string-array name="rictxwf01_color_values">
<item>red</item> <item>red</item>
@ -56,6 +57,7 @@
<item>gray</item> <item>gray</item>
<item>bluegray</item> <item>bluegray</item>
<item>white</item> <item>white</item>
<item>multicolor</item>
</string-array> </string-array>
@ -66,4 +68,31 @@
<item>900</item> <item>900</item>
</string-array> </string-array>
<string-array name="rictxwf01_color_opacity_name">
<item>10%</item>
<item>20%</item>
<item>30%</item>
<item>40%</item>
<item>50%</item>
<item>60%</item>
<item>70%</item>
<item>80%</item>
<item>90%</item>
<item>100%</item>
</string-array>
<string-array name="rictxwf01_color_opacity_value">
<item>0.1</item>
<item>0.2</item>
<item>0.3</item>
<item>0.4</item>
<item>0.5</item>
<item>0.6</item>
<item>0.7</item>
<item>0.8</item>
<item>0.9</item>
<item>1</item>
</string-array>
</resources> </resources>

View file

@ -140,18 +140,20 @@
<string name="color_name_bluegray">blue gray</string> <string name="color_name_bluegray">blue gray</string>
<string name="color_name_white">white</string> <string name="color_name_white">white</string>
<string name="color_name_black">black</string> <string name="color_name_black">black</string>
<string name="color_name_multicolor">multicolor</string>
<string name="pref_choose_your_style">Choose your style</string> <string name="pref_choose_your_style">Choose your style</string>
<string name="style_none">no style</string> <string name="style_none">no style</string>
<string name="style_minimal">minimal style</string> <string name="style_minimal">minimal style</string>
<string name="style_shape">shape style</string>
<string name="style_full">full style</string> <string name="style_full">full style</string>
<string name="style_rainbow">rainbow style</string>
<string name="pref_choose_your_color">Choose your color</string> <string name="pref_choose_your_color">Choose your color</string>
<string name="pref_choose_your_color_saturation">Choose your color saturation</string> <string name="pref_choose_your_color_saturation">Choose your color saturation</string>
<string name="pref_vibrate_hourly">vibrate hourly</string> <string name="pref_choose_your_color_opacity">Choose your color opacity</string>
<string name="pref_vibrate_hourly">Vibrate hourly</string>
<string name="pref_show_weeknumber">Show Week number</string> <string name="pref_show_weeknumber">Show Week number</string>
</resources> </resources>

View file

@ -23,6 +23,13 @@
android:entries="@array/rictxwf01_color_saturation" android:entries="@array/rictxwf01_color_saturation"
android:entryValues="@array/rictxwf01_color_saturation"/> android:entryValues="@array/rictxwf01_color_saturation"/>
<ListPreference
android:key="rictxwf01_frameColorOpacity"
android:title="@string/pref_choose_your_color_opacity"
android:defaultValue="1"
android:entries="@array/rictxwf01_color_opacity_name"
android:entryValues="@array/rictxwf01_color_opacity_value"/>
<CheckBoxPreference <CheckBoxPreference
android:key="show_date" android:key="show_date"
android:title="@string/pref_show_date" android:title="@string/pref_show_date"