Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
opt: ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed Dec 31, 2024
1 parent 7d483bc commit 85afc48
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
Binary file modified app/libs/appcompat-debug.aar
Binary file not shown.
Binary file modified app/libs/preference-debug.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.ui.activity.LauncherActivity;
import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment;
import com.sevtinge.hyperceiler.ui.fragment.dashboard.DashboardFragment;
import com.sevtinge.hyperceiler.utils.BackupUtils;
import com.sevtinge.hyperceiler.utils.DialogHelper;
import com.sevtinge.hyperceiler.utils.LanguageHelper;
Expand All @@ -42,7 +43,7 @@
import fan.navigator.NavigatorFragmentListener;
import fan.preference.DropDownPreference;

public class ModuleSettingsFragment extends SettingsPreferenceFragment
public class ModuleSettingsFragment extends DashboardFragment
implements Preference.OnPreferenceChangeListener, NavigatorFragmentListener, IFragmentChange {
DropDownPreference mIconModePreference;
DropDownPreference mIconModeValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import fan.preference.SeekBarPreferenceCompat;

import androidx.preference.Preference;
import androidx.preference.SeekBarPreference;
import androidx.preference.SwitchPreference;

public class CustomBackgroundSettings extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener {
Expand All @@ -45,10 +46,10 @@ public class CustomBackgroundSettings extends SettingsPreferenceFragment impleme
private SwitchPreference mCustomEnabledPreference;

private ColorPickerPreference mColorPickerPreference;
private SeekBarPreferenceCompat mCornerRadiusPreference;
private SeekBarPreference mCornerRadiusPreference;

private SwitchPreference mBlurEnabledPreference;
private SeekBarPreferenceCompat mBlurRadiusPreference;
private SeekBarPreference mBlurRadiusPreference;

@Override
public int getPreferenceScreenResId() {
Expand Down Expand Up @@ -96,9 +97,9 @@ public void initPrefs() {
private void loadData() {
mCustomEnabledPreference.setChecked(isCustomEnabled());
mColorPickerPreference.setColor(getColor(-1));
//mCornerRadiusPreference.setValue(getSeekBarValue(mCornerRadiusKey, 18));
mCornerRadiusPreference.setValue(getSeekBarValue(mCornerRadiusKey, 18));
mBlurEnabledPreference.setChecked(isBackgroundBlurEnabled());
//mBlurRadiusPreference.setValue(getSeekBarValue(mBlurRadiusKey, 60));
mBlurRadiusPreference.setValue(getSeekBarValue(mBlurRadiusKey, 60));
}

private boolean isCustomEnabled() {
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/xml/various_dialog_custom_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
android:persistent="false"
android:title="@string/custom_background_color" />

<SeekBarPreferenceCompat
<SeekBarPreference
android:key="prefs_key_custom_background_corner_radius"
android:dependency="prefs_key_custom_background_enabled"
android:persistent="false"
Expand All @@ -40,6 +40,7 @@
app:format="%d dp"
app:showSeekBarValue="true"
app:maxValue="60"
android:max="60"
app:defaultValueTitle="@string/array_default"/>

<SwitchPreference
Expand All @@ -48,12 +49,13 @@
android:persistent="false"
android:title="@string/custom_background_blur_enabled" />

<SeekBarPreferenceCompat
<SeekBarPreference
android:dependency="prefs_key_custom_background_blur_enabled"
android:key="prefs_key_custom_background_blur_radius"
android:persistent="false"
android:title="@string/custom_background_blur_radius"
app:defaultValue="60"
android:max="100"
android:defaultValue="60"
app:format="%d dp"
app:showSeekBarValue="true"
app:maxValue="100"
Expand Down

0 comments on commit 85afc48

Please sign in to comment.