Evolver: Introduce Peek Display feature [2/2]
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
|
||||
<!-- Themes - Screen off animation -->
|
||||
<string-array name="themes_screen_off_animation_entries">
|
||||
<item>@string/themes_screen_off_animation_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/themes_screen_off_animation_crt</item>
|
||||
<item>@string/themes_screen_off_animation_scale</item>
|
||||
</string-array>
|
||||
@@ -587,7 +587,7 @@
|
||||
|
||||
<!-- Quick Settings - QS tiles style -->
|
||||
<string-array name="quick_settings_tile_ui_style_entries">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/quick_settings_tile_ui_style_a11_circle</item>
|
||||
<item>@string/quick_settings_tile_ui_style_a11_square</item>
|
||||
<item>@string/quick_settings_tile_ui_style_a11_mix</item>
|
||||
@@ -602,7 +602,7 @@
|
||||
|
||||
<!-- Quick Settings - QS Panel Style -->
|
||||
<string-array name="quick_settings_panel_style_entries" translatable="false">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/quick_settings_panel_style_outline</item>
|
||||
<item>@string/quick_settings_panel_style_two_tone</item>
|
||||
<item>@string/quick_settings_panel_style_color_pop</item>
|
||||
@@ -801,7 +801,7 @@
|
||||
|
||||
<!-- Power Menu styles -->
|
||||
<string-array name="powermenu_style_entries">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/powermenu_style1</item>
|
||||
<item>@string/powermenu_style2</item>
|
||||
<item>@string/powermenu_style3</item>
|
||||
@@ -818,7 +818,7 @@
|
||||
|
||||
<!-- QS Header clock styles -->
|
||||
<string-array name="qs_header_clock_style_entries">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/qs_header_style1</item>
|
||||
<item>@string/qs_header_style2</item>
|
||||
<item>@string/qs_header_style3</item>
|
||||
@@ -835,7 +835,7 @@
|
||||
|
||||
<!-- Notification styles -->
|
||||
<string-array name="notif_style_entries">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/notif_style1</item>
|
||||
<item>@string/notif_style2</item>
|
||||
<item>@string/notif_style3</item>
|
||||
@@ -852,7 +852,7 @@
|
||||
|
||||
<!-- Progress Bar style -->
|
||||
<string-array name="progress_bar_style_entries">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/progress_bar_style1</item>
|
||||
<item>@string/progress_bar_style2</item>
|
||||
<item>@string/progress_bar_style3</item>
|
||||
@@ -868,7 +868,7 @@
|
||||
</string-array>
|
||||
|
||||
<string-array name="volume_styles_entries" translatable="false">
|
||||
<item>@string/color_default</item>
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/double_layer_style</item>
|
||||
<item>@string/gradient_style</item>
|
||||
<item>@string/neumorph_style</item>
|
||||
@@ -1013,4 +1013,26 @@
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Peek display style -->
|
||||
<string-array name="peek_display_style_entries">
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/peek_display_minimalist</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="peek_display_style_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Peek display location -->
|
||||
<string-array name="peek_display_location_entries">
|
||||
<item>@string/top</item>
|
||||
<item>@string/bottom</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="peek_display_location_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
<string name="themes_charging_animation_title">Charging animation</string>
|
||||
<string name="themes_charging_animation_summary">Display an animation when the device is plugged in</string>
|
||||
<string name="themes_screen_off_animation_title">Screen off animation</string>
|
||||
<string name="themes_screen_off_animation_default">Default</string>
|
||||
<string name="themes_screen_off_animation_crt">CRT</string>
|
||||
<string name="themes_screen_off_animation_scale">Scale</string>
|
||||
<string name="themes_udfps_animation_title">UDFPS animation</string>
|
||||
@@ -584,7 +583,6 @@
|
||||
<string name="hex" translatable="false">Hex:</string>
|
||||
<string name="hex_hint" translatable="false">#ff000000</string>
|
||||
<string name="set">Set</string>
|
||||
<string name="color_default">Default</string>
|
||||
<string name="accent_color">Accent color (Default)</string>
|
||||
<string name="notification_color">Notification color</string>
|
||||
<string name="wallpaper_color">Wallpaper color</string>
|
||||
@@ -601,6 +599,9 @@
|
||||
<string name="enable">Enable</string>
|
||||
<string name="disable">Disable</string>
|
||||
<string name="boot_animation_applied">Boot animation applied</string>
|
||||
<string name="default_value">Default</string>
|
||||
<string name="top">Top</string>
|
||||
<string name="bottom">Bottom</string>
|
||||
|
||||
<!-- Units -->
|
||||
<string name="unit_milliseconds">milliseconds</string>
|
||||
@@ -790,4 +791,14 @@
|
||||
|
||||
<!-- Apply Button -->
|
||||
<string name="apply_change_button_title">Apply</string>
|
||||
|
||||
<!-- Peek Display -->
|
||||
<string name="peek_display_notifications_title">Peek display</string>
|
||||
<string name="peek_display_notifications_summary">Enable minimal lock screen notification style</string>
|
||||
<string name="peek_display_location_title">Peek display location</string>
|
||||
<string name="peek_display_bottom_margin_title">Peek display (bottom) top margin</string>
|
||||
|
||||
<!-- Peek Display Styles -->
|
||||
<string name="peek_display_minimalist">Minimalist</string>
|
||||
<string name="peek_display_style_title">Peek display style</string>
|
||||
</resources>
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
android:summary="@string/dw_wallpaper_enabled_summary"
|
||||
android:fragment="org.evolution.settings.fragments.lockscreen.WallpaperDepth" />
|
||||
|
||||
<org.evolution.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="lockscreen_show_carrier"
|
||||
android:title="@string/status_bar_carrier_lock_screen_title"
|
||||
android:summary="@string/status_bar_carrier_lock_screen_summary"
|
||||
android:defaultValue="true" />
|
||||
<Preference
|
||||
android:key="peek_display"
|
||||
android:title="@string/peek_display_notifications_title"
|
||||
android:summary="@string/peek_display_notifications_summary"
|
||||
android:fragment="org.evolution.settings.fragments.lockscreen.PeekDisplay" />
|
||||
|
||||
<org.evolution.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="ls_media_art_enabled"
|
||||
@@ -103,6 +103,12 @@
|
||||
android:title="@string/lock_screen_pulse_settings_title"
|
||||
android:summary="@string/lock_screen_pulse_settings_summary"
|
||||
android:fragment="org.evolution.settings.fragments.lockscreen.PulseSettings" />
|
||||
|
||||
<org.evolution.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="lockscreen_show_carrier"
|
||||
android:title="@string/status_bar_carrier_lock_screen_title"
|
||||
android:summary="@string/status_bar_carrier_lock_screen_summary"
|
||||
android:defaultValue="true" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
||||
56
res/xml/evolution_settings_peek_display.xml
Normal file
56
res/xml/evolution_settings_peek_display.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2023-2024 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.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:title="@string/peek_display_notifications_title">
|
||||
|
||||
<org.evolution.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="peek_display_notifications"
|
||||
android:title="@string/peek_display_notifications_title"
|
||||
android:summary="@string/peek_display_notifications_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.evolution.settings.preferences.SecureSettingListPreference
|
||||
android:key="peek_display_style"
|
||||
android:title="@string/peek_display_style_title"
|
||||
android:entries="@array/peek_display_style_entries"
|
||||
android:entryValues="@array/peek_display_style_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0"
|
||||
android:dependency="peek_display_notifications" />
|
||||
|
||||
<org.evolution.settings.preferences.SecureSettingListPreference
|
||||
android:key="peek_display_location"
|
||||
android:title="@string/peek_display_location_title"
|
||||
android:entries="@array/peek_display_location_entries"
|
||||
android:entryValues="@array/peek_display_location_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="1"
|
||||
android:dependency="peek_display_notifications"/>
|
||||
|
||||
<org.evolution.settings.preferences.SecureSettingSeekBarPreference
|
||||
android:key="peek_display_bottom_margin"
|
||||
android:title="@string/peek_display_bottom_margin_title"
|
||||
android:dependency="peek_display_notifications"
|
||||
android:max="200"
|
||||
settings:min="0"
|
||||
settings:interval="1"
|
||||
settings:units="dp"
|
||||
android:defaultValue="64" />
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 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.
|
||||
*/
|
||||
package org.evolution.settings.fragments.lockscreen;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SearchIndexable
|
||||
public class PeekDisplay extends SettingsPreferenceFragment {
|
||||
|
||||
public static final String TAG = "PeekDisplay";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.evolution_settings_peek_display);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.VIEW_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
* For search
|
||||
*/
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.evolution_settings_peek_display) {
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user