Background and text color can now be changed

This commit is contained in:
ottoptj 2024-08-02 20:49:59 +03:00
commit dfc08513f5
11 changed files with 209 additions and 38 deletions

View file

@ -69,7 +69,6 @@
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
android:textSize="25sp" />
</LinearLayout>
<LinearLayout

View file

@ -20,7 +20,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#6F000000"
android:background="#A7000000"
android:clickable="true"
android:elegantTextHeight="false"
android:imeOptions="actionDone"
@ -40,7 +40,7 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.3"
android:background="#89000000"
android:background="#C3000000"
android:gravity="center"
android:insetTop="0dp"
android:insetBottom="0dp"
@ -78,7 +78,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#6F000000"
android:background="#A7000000"
android:foreground="@drawable/app_action_foreground"
android:text="Info"
android:textAlignment="center"
@ -91,7 +91,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#6F000000"
android:background="#A7000000"
android:foreground="@drawable/app_action_foreground"
android:text="Uninstall"
android:textAlignment="center"
@ -104,7 +104,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#6F000000"
android:background="#A7000000"
android:foreground="@drawable/app_action_foreground"
android:text="Rename"
android:textAlignment="center"
@ -117,7 +117,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#6F000000"
android:background="#A7000000"
android:foreground="@drawable/app_action_foreground"
android:text="Hide"
android:textAlignment="center"
@ -130,7 +130,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#6F000000"
android:background="#A7000000"
android:foreground="@drawable/app_action_foreground"
android:text="Close"
android:textAlignment="center"

View file

@ -43,4 +43,26 @@
<item>celsius</item>
<item>fahrenheit</item>
</string-array>
<string-array name="bg_options">
<item>Transparent</item>
<item>Black</item>
<item>White</item>
</string-array>
<string-array name="bg_values">
<item>#00000000</item>
<item>#FF000000</item>
<item>#FFD6D6D6</item>
</string-array>
<string-array name="color_options">
<item>Light</item>
<item>Dark</item>
</string-array>
<string-array name="color_values">
<item>#FFF3F3F3</item>
<item>#FF0C0C0C</item>
</string-array>
</resources>

View file

@ -3,9 +3,6 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="original_color">#00000000</color>
<color name="new_color">#3F000000</color>
<color name="settings_bg">#88000000</color>
<color name="settings_bg">#FF1B1B1B</color>
</resources>

View file

@ -14,6 +14,7 @@
<style name="SettingsTheme" parent="Base.Theme.YamLauncher">
<item name="android:windowBackground">@color/settings_bg</item>
<item name="android:windowShowWallpaper">false</item>
</style>
<style name="AppSearchView" parent="Widget.AppCompat.SearchView" >

View file

@ -1,6 +1,30 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:allowDividerAbove="false"
app:title="Colors">
<ListPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:defaultValue="#00000000"
app:entries="@array/bg_options"
app:entryValues="@array/bg_values"
app:key="bgColor"
app:title="Background Color"
app:useSimpleSummaryProvider="true" />
<ListPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:defaultValue="#FFF3F3F3"
app:entries="@array/color_options"
app:entryValues="@array/color_values"
app:key="textColor"
app:title="Text Color"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory
app:allowDividerAbove="false"
app:title="Alignment">