Skip to content

Commit

Permalink
app: ui: One UI 6 theme
Browse files Browse the repository at this point in the history
Signed-off-by: BlackMesa123 <[email protected]>
  • Loading branch information
salvogiangri committed Sep 1, 2023
1 parent 3dd28fc commit ac979c2
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 28 deletions.
3 changes: 2 additions & 1 deletion app/src/main/res/layout-land/activity_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
app:fontFamily="@string/sec_font_family"
android:textSize="30.0sp"
android:fontFamily="sec-roboto-light"
android:textStyle="bold"
android:textColor="@color/info_app_name_color" />

Expand All @@ -57,6 +57,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2.0dp"
app:fontFamily="@string/sec_font_family"
android:textSize="15.0sp"
android:textColor="@color/info_app_version_color" />

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/activity_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
android:text="@string/app_name"
android:textSize="18.0sp"
android:textAppearance="?android:attr/textAppearanceListItem"
app:fontFamily="@string/sec_font_family"
android:textColor="@color/info_app_name_color" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/main_app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
app:fontFamily="@string/sec_font_family"
android:textColor="@color/info_app_version_color" />

</LinearLayout>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/layout/list_item_view.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/list_item_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -25,6 +26,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceListItem"
app:fontFamily="@string/sec_font_family"
android:textAlignment="viewStart"
android:maxLines="5"
android:ellipsize="end" />
Expand All @@ -36,6 +38,7 @@
android:layout_below="@id/list_item_title"
android:layout_alignStart="@id/list_item_title"
android:textAppearance="?android:attr/textAppearanceSmall"
app:fontFamily="@string/sec_font_family"
android:textAlignment="viewStart" />

</RelativeLayout>
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/layout/main_switch_view.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="58.0dp"
android:paddingHorizontal="@dimen/sep_main_switch_padding_horizontal"
Expand All @@ -12,14 +13,15 @@
android:layout_width="0.0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="20.0sp"
app:fontFamily="@string/sec_font_family"
android:textFontWeight="600"
android:textSize="@dimen/sep_main_switch_text_size"
android:textAlignment="viewStart"
android:ellipsize="end"
android:maxLines="1"
android:importantForAccessibility="no"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"/>
android:importantForAccessibility="no" />

<androidx.appcompat.widget.SwitchCompat
<Switch
android:id="@+id/main_switch_widget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/values-night-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<resources>

<style name="Theme.KnoxPatch" parent="Theme.AppCompat.NoActionBar">
<item name="android:statusBarColor">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_background_color</item>
<item name="android:statusBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:colorBackground">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:windowSplashScreenBackground">@color/sep_theme_background_color</item>
<item name="android:windowSplashScreenAnimatedIcon">@color/sep_theme_background_color</item>
<item name="android:windowSplashScreenBackground">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowSplashScreenAnimatedIcon">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:listChoiceBackgroundIndicator">?attr/listChoiceBackgroundIndicator</item>
<item name="roundedCornerColor">@color/sep_theme_round_and_bg_color</item>
</style>

</resources>
12 changes: 12 additions & 0 deletions app/src/main/res/values-night-v34/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="sep_theme_round_and_bg_color">#ff010102</color>
<color name="sep_theme_background_color">#ff17171a</color>
<color name="sep_theme_functional_green_color">#ff58db9c</color>

<color name="sep_theme_main_switch_off_background_color">#ff17171a</color>
<color name="sep_theme_main_switch_on_background_color">#ff2d2d30</color>
<color name="sep_theme_main_switch_off_text_color">#fffafaff</color>

<color name="info_app_name_color">#fffafaff</color>
</resources>
5 changes: 3 additions & 2 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="sep_theme_background_color">@color/sesl_round_and_bgcolor_dark</color>
<color name="sep_theme_functional_green_color">@color/sesl_functional_green_dark</color>
<color name="sep_theme_round_and_bg_color">#ff010101</color>
<color name="sep_theme_background_color">#ff171717</color>
<color name="sep_theme_functional_green_color">#ff5ad69e</color>

<color name="sep_theme_main_switch_off_background_color">#ff171717</color>
<color name="sep_theme_main_switch_on_background_color">#ff2d2d2d</color>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<resources>

<style name="Theme.KnoxPatch" parent="Theme.AppCompat.NoActionBar">
<item name="android:statusBarColor">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_background_color</item>
<item name="android:statusBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:colorBackground">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:listChoiceBackgroundIndicator">?attr/listChoiceBackgroundIndicator</item>
<item name="roundedCornerColor">@color/sep_theme_round_and_bg_color</item>
</style>

</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values-v31/strings-untranslatable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="sec_font_family" translatable="false">sec</string>
</resources>
10 changes: 6 additions & 4 deletions app/src/main/res/values-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<resources>

<style name="Theme.KnoxPatch" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:statusBarColor">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_background_color</item>
<item name="android:statusBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:colorBackground">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:windowSplashScreenBackground">@color/sep_theme_background_color</item>
<item name="android:windowSplashScreenAnimatedIcon">@color/sep_theme_background_color</item>
<item name="android:windowSplashScreenBackground">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowSplashScreenAnimatedIcon">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:listChoiceBackgroundIndicator">?attr/listChoiceBackgroundIndicator</item>
<item name="roundedCornerColor">@color/sep_theme_round_and_bg_color</item>
</style>

</resources>
12 changes: 12 additions & 0 deletions app/src/main/res/values-v34/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="sep_theme_round_and_bg_color">#fff6f6f8</color>
<color name="sep_theme_background_color">#fffcfcff</color>
<color name="sep_theme_functional_green_color">#ff11a85f</color>

<color name="sep_theme_main_switch_off_background_color">#fffcfcff</color>
<color name="sep_theme_main_switch_on_background_color">#ffeeeef0</color>
<color name="sep_theme_main_switch_off_text_color">#ff252528</color>

<color name="info_app_name_color">#ff010102</color>
</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values-v34/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<dimen name="sep_main_switch_text_size">18.0sp</dimen>

</resources>
5 changes: 3 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="sep_theme_background_color">@color/sesl_round_and_bgcolor_light</color>
<color name="sep_theme_functional_green_color">@color/sesl_functional_green_light</color>
<color name="sep_theme_round_and_bg_color">#fff6f6f6</color>
<color name="sep_theme_background_color">#fffcfcfc</color>
<color name="sep_theme_functional_green_color">#ff14a866</color>

<color name="sep_theme_main_switch_off_background_color">#fffcfcfc</color>
<color name="sep_theme_main_switch_on_background_color">#ffe9e9e9</color>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<resources>

<dimen name="sep_main_switch_padding_horizontal">12.0dp</dimen>
<dimen name="sep_main_switch_text_size">20.0sp</dimen>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings-untranslatable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
<string name="knox_version_knox_ml" translatable="false">Knox ML</string>
<string name="knox_version_knox_dualdar" translatable="false">DualDAR</string>
<string name="knox_version_knox_hdm" translatable="false">HDM</string>

<string name="sec_font_family" translatable="false">sec-roboto-light</string>
</resources>
6 changes: 4 additions & 2 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<resources>

<style name="Theme.KnoxPatch" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:statusBarColor">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_background_color</item>
<item name="android:statusBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:colorBackground">@color/sep_theme_background_color</item>
<item name="android:navigationBarColor">@color/sep_theme_round_and_bg_color</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:listChoiceBackgroundIndicator">?attr/listChoiceBackgroundIndicator</item>
<item name="roundedCornerColor">@color/sep_theme_round_and_bg_color</item>
</style>

</resources>
16 changes: 9 additions & 7 deletions app/src/main/res/xml/sep_color_theme_meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
<ThemeMetaData FormatVersion="1.3" GuideVersion="1.4">
<AppMetaData Name="KnoxPatch" TargetApi="28" TargetPackageName="io.mesalabs.knoxpatch" VersionCode="1" VersionName="">
<Include RefName="SESL" />
<Property Comment="Main switch off background color" DefaultValue="#fffcfcfc" DestAttribName="sep_theme_main_switch_off_background_color" UID="610-1" ValueRef="1-40-2" ValueType="BgColor" />
<Property Comment="Main switch on background color" DefaultValue="#ffe9e9e9" DestAttribName="sep_theme_main_switch_on_background_color" UID="610-2" ValueRef="1-40-1" ValueType="BgColor" />
<Property Comment="Main switch off text color" DefaultValue="#ff252525" DestAttribName="sep_theme_main_switch_off_text_color" UID="610-3" ValueRef="1-40-4" ValueType="BgColor" />
<Property Comment="Main switch on text color" DefaultValue="#ff0072de" DestAttribName="sep_theme_main_switch_on_text_color" UID="610-4" ValueRef="1-40-3" ValueType="BgColor" />
<Property Comment="App name text color" DefaultValue="#ff010101" DestAttribName="info_app_name_color" UID="610-5" ValueRef="1-1-3" ValueType="Color"/>
<Property Comment="App version text color" DefaultValue="#ff8c8c8c" DestAttribName="info_app_version_color" UID="610-6" ValueRef="1-1-4" ValueType="Color"/>
<Property Comment="GitHub Icon color" DefaultValue="#ff8c8c8c" DestAttribName="info_github_icon_color" UID="610-7" ValueRef="1-11-3" ValueType="Color" />
<Property Comment="Round and bg color" DefaultValue="#fff6f6f6" DestAttribName="sep_theme_round_and_bg_color" UID="610-1" ValueRef="1-1-1" ValueType="BgColor" />
<Property Comment="Background color" DefaultValue="#fffcfcfc" DestAttribName="sep_theme_background_color" POption="FixedOpacity|AlwaysOverriden" UID="610-2" ValueRef="1-18-1" ValueType="BgColor" />
<Property Comment="Main switch off background color" DefaultValue="#fffcfcfc" DestAttribName="sep_theme_main_switch_off_background_color" UID="610-3" ValueRef="1-40-2" ValueType="BgColor" />
<Property Comment="Main switch on background color" DefaultValue="#ffe9e9e9" DestAttribName="sep_theme_main_switch_on_background_color" UID="610-4" ValueRef="1-40-1" ValueType="BgColor" />
<Property Comment="Main switch off text color" DefaultValue="#ff252525" DestAttribName="sep_theme_main_switch_off_text_color" UID="610-5" ValueRef="1-40-4" ValueType="BgColor" />
<Property Comment="Main switch on text color" DefaultValue="#ff0072de" DestAttribName="sep_theme_main_switch_on_text_color" UID="610-6" ValueRef="1-40-3" ValueType="BgColor" />
<Property Comment="App name text color" DefaultValue="#ff010101" DestAttribName="info_app_name_color" UID="610-7" ValueRef="1-1-3" ValueType="Color"/>
<Property Comment="App version text color" DefaultValue="#ff8c8c8c" DestAttribName="info_app_version_color" UID="610-8" ValueRef="1-1-4" ValueType="Color"/>
<Property Comment="GitHub Icon color" DefaultValue="#ff8c8c8c" DestAttribName="info_github_icon_color" UID="610-9" ValueRef="1-11-3" ValueType="Color" />
</AppMetaData>
</ThemeMetaData>

0 comments on commit ac979c2

Please sign in to comment.