Skip to content

Commit

Permalink
extras: Implement Volume Styles [3/3]
Browse files Browse the repository at this point in the history
Co-authored-by: DrDisagree <[email protected]>
Signed-off-by: minaripenguin <[email protected]>
  • Loading branch information
2 people authored and joeyhuab committed Feb 5, 2025
1 parent fb5e444 commit ab3201b
Show file tree
Hide file tree
Showing 37 changed files with 845 additions and 0 deletions.
9 changes: 9 additions & 0 deletions evolution.mk
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,15 @@ PRODUCT_PACKAGES += \
UdfpsIcons
endif

# Volume Styles
PRODUCT_PACKAGES += \
VolumeDoubleLayer \
VolumeGradient \
VolumeNeumorph \
VolumeNeumorphOutline \
VolumeOutline \
VolumeShadedLayer

# Include {Lato,Rubik} fonts
$(call inherit-product-if-exists, external/google-fonts/lato/fonts.mk)
$(call inherit-product-if-exists, external/google-fonts/rubik/fonts.mk)
Expand Down
31 changes: 31 additions & 0 deletions themes/Volume/VolumeDoubleLayer/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright (c) 2023, the RisingOS Android Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_RRO_THEME := VolumeDoubleLayer

LOCAL_PRODUCT_MODULE := true

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PACKAGE_NAME := VolumeDoubleLayer
LOCAL_SDK_VERSION := current

include $(BUILD_RRO_PACKAGE)
25 changes: 25 additions & 0 deletions themes/Volume/VolumeDoubleLayer/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
/**
* Copyright (c) 2023, the RisingOS Android Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.system.volume.style1"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="com.android.systemui" android:category="android.theme.customization.volume_panel" android:priority="1"/>

<application android:label="Volume Double Layer" android:hasCode="false" android:allowBackup="false"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingMode="stack">
<item
android:width="@dimen/volume_ringer_drawer_item_size"
android:height="@dimen/volume_ringer_drawer_item_size">
<layer-list>
<item>
<shape>
<gradient
android:angle="270.0"
android:endColor="@color/holo_green_light"
android:startColor="@color/holo_blue_light" />
<corners android:radius="@dimen/volume_ringer_drawer_item_size_half" />
</shape>
</item>
<item>
<shape>
<solid android:color="#40000000" />
<corners android:radius="@dimen/volume_ringer_drawer_item_size_half" />
</shape>
</item>
<item
android:bottom="4.0dip"
android:end="4.0dip"
android:gravity="fill_horizontal|center"
android:start="4.0dip"
android:top="4.0dip">
<shape>
<gradient
android:angle="270.0"
android:endColor="@color/holo_green_light"
android:startColor="@color/holo_blue_light" />
<corners android:radius="@dimen/abc_star_small" />
</shape>
</item>
</layer-list>
</item>
</layer-list>
5 changes: 5 additions & 0 deletions themes/Volume/VolumeDoubleLayer/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="holo_blue_light">@android:color/system_accent1_500</color>
<color name="holo_green_light">@android:color/system_accent3_200</color>
</resources>
5 changes: 5 additions & 0 deletions themes/Volume/VolumeDoubleLayer/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="holo_blue_light">@android:color/system_accent1_400</color>
<color name="holo_green_light">@android:color/system_accent3_600</color>
</resources>
40 changes: 40 additions & 0 deletions themes/Volume/VolumeDoubleLayer/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="global_actions_corner_radius">28.0dip</dimen>
<dimen name="notification_corner_radius">28.0dip</dimen>
<dimen name="notification_scrim_corner_radius">32.0dip</dimen>
<dimen name="ongoing_appops_chip_bg_corner_radius">28.0dip</dimen>
<dimen name="ongoing_call_chip_corner_radius">28.0dip</dimen>
<dimen name="qs_corner_radius">28.0dip</dimen>
<dimen name="qs_footer_action_corner_radius">28.0dip</dimen>
<dimen name="qs_security_footer_corner_radius">28.0dip</dimen>
<dimen name="rounded_slider_background_rounded_corner">32.0dip</dimen>
<dimen name="rounded_slider_corner_radius">28.0dip</dimen>
<dimen name="settingslib_dialogCornerRadius">28.0dip</dimen>
<dimen name="split_divider_corner_size">42.0dip</dimen>
<dimen name="volume_dialog_panel_width_half">28.0dip</dimen>
<dimen name="volume_ringer_drawer_item_size">42.0dip</dimen>
<dimen name="volume_ringer_drawer_item_size_half">21.0dip</dimen>
<dimen name="volume_dialog_slider_corner_radius">28.0dip</dimen>
<dimen name="volume_dialog_track_corner_radius">28.0dip</dimen>
<dimen name="abc_star_small">17.0dip</dimen>
<dimen name="volume_dialog_panel_transparent_padding_horizontal">8dp</dimen>
<dimen name="volume_dialog_panel_transparent_padding">20dp</dimen>
<dimen name="volume_dialog_ringer_rows_padding">7dp</dimen>
<dimen name="volume_dialog_stream_padding">12dp</dimen>
<dimen name="volume_dialog_panel_width">56dp</dimen>
<dimen name="volume_dialog_slider_width">42dp</dimen>
<dimen name="volume_dialog_slider_width_bg">2dp</dimen>
<dimen name="volume_dialog_slider_width_aosp">42dp</dimen>
<!-- (volume_dialog_panel_width - rounded_slider_icon_size) / 2 -->
<dimen name="volume_slider_icon_inset">11dp</dimen>
<dimen name="volume_dialog_track_width">42dp</dimen>
<dimen name="volume_dialog_ringer_size">42dp</dimen>
<dimen name="volume_dialog_ringer_icon_padding">20dp</dimen>
<dimen name="volume_dialog_caption_size">56dp</dimen>
<dimen name="volume_dialog_tap_target_size">42dp</dimen>
<dimen name="volume_dialog_spacer">4dp</dimen>
<dimen name="volume_dialog_row_margin_bottom">8dp</dimen>
<dimen name="volume_dialog_elevation">9dp</dimen>
<dimen name="volume_dialog_background_blur_radius">0dp</dimen>
</resources>
31 changes: 31 additions & 0 deletions themes/Volume/VolumeGradient/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright (c) 2023, the RisingOS Android Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_RRO_THEME := VolumeGradient

LOCAL_PRODUCT_MODULE := true

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PACKAGE_NAME := VolumeGradient
LOCAL_SDK_VERSION := current

include $(BUILD_RRO_PACKAGE)
25 changes: 25 additions & 0 deletions themes/Volume/VolumeGradient/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
/**
* Copyright (c) 2023, the RisingOS Android Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.system.volume.style2"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="com.android.systemui" android:category="android.theme.customization.volume_panel" android:priority="1"/>

<application android:label="Volume Gradient" android:hasCode="false" android:allowBackup="false"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingMode="stack">
<size
android:width="@dimen/volume_ringer_drawer_item_size"
android:height="@dimen/volume_ringer_drawer_item_size" />
<gradient
android:angle="270.0"
android:endColor="@color/holo_green_light"
android:startColor="@color/holo_blue_light" />
<corners android:radius="@dimen/volume_ringer_drawer_item_size_half" />
</shape>
5 changes: 5 additions & 0 deletions themes/Volume/VolumeGradient/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="holo_blue_light">@android:color/system_accent1_500</color>
<color name="holo_green_light">@android:color/system_accent3_200</color>
</resources>
5 changes: 5 additions & 0 deletions themes/Volume/VolumeGradient/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="holo_blue_light">@android:color/system_accent1_400</color>
<color name="holo_green_light">@android:color/system_accent3_600</color>
</resources>
40 changes: 40 additions & 0 deletions themes/Volume/VolumeGradient/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="global_actions_corner_radius">28.0dip</dimen>
<dimen name="notification_corner_radius">28.0dip</dimen>
<dimen name="notification_scrim_corner_radius">32.0dip</dimen>
<dimen name="ongoing_appops_chip_bg_corner_radius">28.0dip</dimen>
<dimen name="ongoing_call_chip_corner_radius">28.0dip</dimen>
<dimen name="qs_corner_radius">28.0dip</dimen>
<dimen name="qs_footer_action_corner_radius">28.0dip</dimen>
<dimen name="qs_security_footer_corner_radius">28.0dip</dimen>
<dimen name="rounded_slider_background_rounded_corner">32.0dip</dimen>
<dimen name="rounded_slider_corner_radius">28.0dip</dimen>
<dimen name="settingslib_dialogCornerRadius">28.0dip</dimen>
<dimen name="split_divider_corner_size">42.0dip</dimen>
<dimen name="volume_dialog_panel_width_half">28.0dip</dimen>
<dimen name="volume_ringer_drawer_item_size">42.0dip</dimen>
<dimen name="volume_ringer_drawer_item_size_half">21.0dip</dimen>
<dimen name="volume_dialog_slider_corner_radius">28.0dip</dimen>
<dimen name="volume_dialog_track_corner_radius">28.0dip</dimen>
<dimen name="abc_star_small">17.0dip</dimen>
<dimen name="volume_dialog_panel_transparent_padding_horizontal">8dp</dimen>
<dimen name="volume_dialog_panel_transparent_padding">20dp</dimen>
<dimen name="volume_dialog_ringer_rows_padding">7dp</dimen>
<dimen name="volume_dialog_stream_padding">12dp</dimen>
<dimen name="volume_dialog_panel_width">56dp</dimen>
<dimen name="volume_dialog_slider_width">42dp</dimen>
<dimen name="volume_dialog_slider_width_bg">2dp</dimen>
<dimen name="volume_dialog_slider_width_aosp">42dp</dimen>
<!-- (volume_dialog_panel_width - rounded_slider_icon_size) / 2 -->
<dimen name="volume_slider_icon_inset">11dp</dimen>
<dimen name="volume_dialog_track_width">42dp</dimen>
<dimen name="volume_dialog_ringer_size">42dp</dimen>
<dimen name="volume_dialog_ringer_icon_padding">20dp</dimen>
<dimen name="volume_dialog_caption_size">56dp</dimen>
<dimen name="volume_dialog_tap_target_size">42dp</dimen>
<dimen name="volume_dialog_spacer">4dp</dimen>
<dimen name="volume_dialog_row_margin_bottom">8dp</dimen>
<dimen name="volume_dialog_elevation">9dp</dimen>
<dimen name="volume_dialog_background_blur_radius">0dp</dimen>
</resources>
31 changes: 31 additions & 0 deletions themes/Volume/VolumeNeumorph/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright (c) 2023, the RisingOS Android Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_RRO_THEME := VolumeNeumorph

LOCAL_PRODUCT_MODULE := true

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PACKAGE_NAME := VolumeNeumorph
LOCAL_SDK_VERSION := current

include $(BUILD_RRO_PACKAGE)
25 changes: 25 additions & 0 deletions themes/Volume/VolumeNeumorph/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
/**
* Copyright (c) 2023, the RisingOS Android Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.system.volume.style3"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="com.android.systemui" android:category="android.theme.customization.volume_panel" android:priority="1"/>

<application android:label="Volume Neumorph" android:hasCode="false" android:allowBackup="false"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingMode="stack">
<item
android:width="@dimen/volume_ringer_drawer_item_size"
android:height="@dimen/volume_ringer_drawer_item_size">
<layer-list>
<item>
<shape>
<gradient
android:angle="0.0"
android:endColor="@color/holo_green_light"
android:startColor="@color/holo_blue_light" />
<corners android:radius="@dimen/volume_ringer_drawer_item_size_half" />
</shape>
</item>
<item
android:bottom="4.0dip"
android:end="4.0dip"
android:gravity="fill_horizontal|center"
android:start="4.0dip"
android:top="4.0dip">
<shape>
<gradient
android:angle="180.0"
android:endColor="@color/holo_green_light"
android:startColor="@color/holo_blue_light" />
<corners android:radius="@dimen/abc_star_small" />
</shape>
</item>
</layer-list>
</item>
</layer-list>
5 changes: 5 additions & 0 deletions themes/Volume/VolumeNeumorph/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="holo_blue_light">@android:color/system_accent1_500</color>
<color name="holo_green_light">@android:color/system_accent3_200</color>
</resources>
5 changes: 5 additions & 0 deletions themes/Volume/VolumeNeumorph/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="holo_blue_light">@android:color/system_accent1_400</color>
<color name="holo_green_light">@android:color/system_accent3_600</color>
</resources>
Loading

0 comments on commit ab3201b

Please sign in to comment.