Commit Graph

800 Commits

Author SHA1 Message Date
maxwen
8583c3f3db Cherish:add pref for qs brightness slider position (2/2) 2020-03-29 17:13:00 +07:00
00day0
64e396db18 Cherish:optional miui-like brightness slider [3/3]
Signed-off-by: 00day0 <therandomuser11@gmail.com>
2020-03-29 17:13:00 +07:00
Ezio Lacandia Bijelkic
d7d22769cc Cherish:Allow to set QS panel columns and rows [2/2]
Change-Id: If89aa8d51300dfba06ec55332c57b98417d4fcb9
2020-03-29 17:12:49 +07:00
beanstown106
e74518bb4b Cherish: Add toggle for Lockscreen Media Art [2/3]
* Allows to choose whether or not to show album art/media art on lockscreen

Change-Id: Ieea583a0e42c317e1651ecaba66ac07c02934250
2020-03-25 15:46:32 +00:00
beanstown106
868309ed94 Cherish: Incall vibration option [3/3]
* this works with google and aosp dialer :)

Adapted to PE

Change-Id: Ia3a239ef4c3c5e9ad6e1efae5def7e06f333cbfe
2020-03-25 15:46:32 +00:00
Joey Huab
fcaaf0b399 Cherish:Add a toggle for the new QS tint [2/2] 2020-03-25 15:46:21 +00:00
Pranav Vashi
fcf50d92ad support: Extend CustomSeekbarPreference
spezi77: Remove SeekBarPreferenceCham

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: spezi77 <spezi7713@gmx.net>
2020-03-23 17:31:36 +07:00
Anushek Prasal
fdc54b320d support: Extend MasterSwitchPreference 2020-03-23 17:31:36 +07:00
Anushek Prasal
dd1366136f support: MasterSwitchPreference: Fix settings not applying
Signed-off-by: spezi77 <spezi7713@gmx.net>
2020-03-23 17:31:36 +07:00
SpiritCroc
a07b60e8de support: MasterSwitchPreference: isChecked doesn't rely on existence of switch
When checking for isChecked in e.g. a preferenceFragment, we want to
know the setting value, independent of whether the preference already
has been inflated or not

Change-Id: Ie3e777388805d329fea6f56ef306a4c941993938
Signed-off-by: spezi77 <spezi7713@gmx.net>
2020-03-23 17:31:36 +07:00
SpiritCroc
6636e195ec support: Add SystemSettingsMasterSwitchPreference
- Import MasterSwitchPreference from Settings(Lib)
- Add System setting variant + fix initial values
- Use icon_frame as ic in layout instead of icon_container to fix hiding
  icon
- Allow launching fragments with the android:fragment extra same as
  currently possible for PreferenceScreens
- Add possibility to reload value when it might have changed
  (best to call onResume when the value can also be changed from the
  sub preference screen)

@ZeNiXxX: Adapt to AndroidX

Original commit history for TwoTargetPreference from
frameworks/base/packages/SettingsLib:

commit 8a01abf592762c75bb92a9e1787227c44f1f4a8e
Author: Fan Zhang <zhfan@google.com>

    Adjust icon width to match the width with framework

commit 035ff93430b71ef856f299c9f676f8d340403e16
Author: Fan Zhang <zhfan@google.com>

    Move two target preference layout from settings to lib

Original commit history for MasterSwitchPreference.java:

commit e2ad415fdba79b27dfd2c98a2b01d56db9257c71
Author: Doris Ling <dling@google.com>

    Add content description to the master switch toggle button.

commit c68ae0b9fdd5f5a149364d0af7e8a9497a91adfd
Author: Julia Reynolds <juliacr@google.com>

    Channel settings updates

commit aa805e70ed0c7f4eaa66b6e6a0b79bf1b3b9d16d
Author: Doris Ling <dling@google.com>

    Allow settings preference title to span over multiple lines.

commit fe292515d88e803057a5b6077f67ce284b595d7a
Author: Fan Zhang <zhfan@google.com>

    Refactor the layout for MasterSwitch to a 2 target pref

commit 6467d2027e8fefd646af03c08d51d91386843463
Author: Doris Ling <dling@google.com>

    Extends the touch area for the switch in Master Switch preference.

commit 762a733afa26b3d49edfae81536c9fcbe9384483
Author: Julia Reynolds <juliacr@google.com>

    Allow switch preferences to span lines.

commit 56199e94876d4bbd89fb0272156702a321dd681e
Author: Fan Zhang <zhfan@google.com>

    Misc fix on network & internet screen for developer preview

commit c4c9f4d50eec659eb50f8ed671c27d8c6ef0c924
Author: Doris Ling <dling@google.com>

    Update Network & internet->Wi-Fi to use MasterSwitchPreference.

commit 1432cb852972daedd6c2fde78abb769b722fc47d
Author: Doris Ling <dling@google.com>

    Add new preference class MasterSwitchPreference.

Original commit history for preference_widget_master_switch.xml:

commit fe292515d88e803057a5b6077f67ce284b595d7a
Author: Fan Zhang <zhfan@google.com>

    Refactor the layout for MasterSwitch to a 2 target pref

commit 6467d2027e8fefd646af03c08d51d91386843463
Author: Doris Ling <dling@google.com>

    Extends the touch area for the switch in Master Switch preference.

commit 14c2050330b36a00b708049a691d4e1c39700586
Merge: 249077a0cd 56199e9487
Author: TreeHugger Robot <treehugger-gerrit@google.com>

    Merge "Misc fix on network & internet screen for developer preview"

commit 56199e94876d4bbd89fb0272156702a321dd681e
Author: Fan Zhang <zhfan@google.com>

    Misc fix on network & internet screen for developer preview

commit 4f1eca05be15b9a30757434ce6c11abe5e6db381
Author: Doris Ling <dling@google.com>

    Update the color for the master switch divider.

commit 1432cb852972daedd6c2fde78abb769b722fc47d
Author: Doris Ling <dling@google.com>

    Add new preference class MasterSwitchPreference.

Change-Id: I7ee76f4626223ec3c66ae7d10ebb87c88c5a8175
Signed-off-by: spezi77 <spezi7713@gmx.net>
2020-03-23 17:31:36 +07:00
SpiritCroc
baff4b6ed0 Add seekbar and list settings preferences
Taken from AICP
2020-03-23 17:31:36 +07:00
SpiritCroc
cd35b45d96 Add switch preferences that hold system settings 2020-03-23 17:31:36 +07:00
xyyx
b602f24567 Navbar: Fix missed title 2020-03-23 17:31:36 +07:00
00day0
e0dc6f4d7a Cherish: ColorPicker: make it more user friendly
* Show RGB value instead of ARGB because most average users dont even know about alpha in hex color values
* Make edit text limited to 7 characters and one line
* Remove enter image button

Signed-off-by: 00day0 <therandomuser11@gmail.com>
Signed-off-by: NurKeinNeid <mralexman3000@gmail.com>
2020-03-23 17:31:36 +07:00
Hưng Phan
ba9e20e869 Fix derp 2020-03-23 17:31:36 +07:00
00day0
06805c7814 OxygenOS styled dismiss all button [2/2] 2020-03-23 17:31:36 +07:00
Hưng Phan
b2e208e670 Cherish: Add path NavBarSettings in menu 2020-03-23 17:31:36 +07:00
xyyx
948252390c LockscreenCharging: squashed (3/3)
based on:
[1/2] Settings: show more battery info on lockscreen when charging by yank555-lu
2020-03-23 17:31:36 +07:00
xyyx
8a61ea170d Cherish: Move to androidx 2019-10-03 19:52:32 +07:00
xyyx
dc303b2607 Color Picker: Remove OnClick listener to fix disabling 2019-10-03 19:52:16 +07:00
xyyx
369891b075 CustomSeekBar: Fix NPE
08-23 20:07:44.650 31111 31111 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
08-23 20:07:44.650 31111 31111 E AndroidRuntime: 	at com.nitrogen.settings.preferences.CustomSeekBarPreference.setDefaultValue(CustomSeekBarPreference.java:240)
2019-10-03 19:52:04 +07:00
xyyx
745b46dffe Cherish: Add Oneplus3Parts to main menu 2019-10-03 19:51:32 +07:00
Roger Truttmann
ed2eedb07a New Personalization icons 2019-10-03 19:50:05 +07:00
xyyx
9fce824e13 Add alert_dialog_padding_material 2019-10-03 19:47:18 +07:00
xyyx
f4e35af95b CustomSeekBar: Fix disabling when create
before: https://imgur.com/a/jtNip
after: https://imgur.com/a/Q1rJH
2019-10-03 19:47:09 +07:00
ezio84
243dffeb0e New CustomSeekBar: allow to translate "Default" value string
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:47:01 +07:00
beanstown106
a4dba2147e Add utils 2019-10-03 19:46:50 +07:00
ezio84
b9fd5ed58a Fix SecureSettingsSwitchPref and Global derp
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:45:41 +07:00
ezio84
cfc8d23c5e Color Picker: fix dead dialog showing under the new one after rotation
to replicate: open the picker, rotate to landscape, press the back
button or rotate to portrait and press the back button, you'll see
the dead old view

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:45:30 +07:00
ezio84
dbbb73f0ae Colorpicker and customseekbar: add method to set default values
also be sure default values is not greater than max value
2019-10-03 19:45:22 +07:00
ezio84
d46369fee4 Change color picker reset icon
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:45:11 +07:00
ezio84
2c5e84fee9 Color picker reset button: refresh color preview on click
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:45:00 +07:00
ezio84
301473dca2 Color Picker: use oval preview
this code was in old light customization settings commit, no idea who made it

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:44:41 +07:00
ezio84
82cfe1a62e Color Picker: don't show picker on click if preference is disabled
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:43:05 +07:00
ezio84
a5fd62d62f Color picker: don't show keyboard on start
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:42:55 +07:00
ezio84
38fa7994db Color picker pref: allow tap also on the text to show the picker
other prefs like SwitchPref work this way

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:42:44 +07:00
ezio84
249c4a342a Color picker: show hex input box on top
so when showing keyboard to edit text the box will be
still visible

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:42:35 +07:00
Alex Cruz
0950761101 Improve color picker layout / cleaned up some of the code
- Fixed possible NPE with calling getWindow()
- Remove unnecessary panel of preset colors underneath the color picker
- Changed dialog to AlertDialog to match LED color picker

While this doesn't look EXACTLY like the LED color picker, this along with
the commit below bring it closer than ever before.

http://gerrit.dirtyunicorns.com/#/c/1199/

Change-Id: I13bc40d1882676d92e5c4ae4bfcf25865e88dad1

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:42:25 +07:00
ezio84
8dc8247882 New custom seekbar: more improvements
fix value txt being cutted when too long

allow to set a custom string to show instead of the
numeric value when value is defaultValue
2019-10-03 19:42:11 +07:00
ezio84
bbd8f269b5 New fresh look for CustomSeekbar
Oreo prefs style

thanks @Mazda-- for suggestion on how to remove the top divider

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:42:00 +07:00
Alex Cruz
c665521d8c Replace colorpicker action set png with vector
Change-Id: Ie44e1e91234706bb80f1ac56c72a68e1fe8eff07

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:41:48 +07:00
ezio84
86eb4dba0a margaritov color picker: add a proper landscape layout
preview:
https://s30.postimg.org/dvr6fyza9/Screenshot_20170104_155921.png

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:41:37 +07:00
Randall Rushing
635b911717 ColorPickerPreference: Introduce set default button when attribute is set
Set a default value using the "defaultColorValue" settings namespace
attribute. The general idea is often we want set a value of say "-1"
and let framework handle it. One such scenario would be if you are
changing the color of a ImageView using ColorFilter. When framework
receives a "-1" value, framework sets the ImageView ColorFilter to null,
restoring the ImageView to original state.

Screenshot:

https://teameos.slack.com/files/bigrushdog/F09T5S155/screenshot_2015-08-31-04-02-54.png

Change-Id: I4ad63576270de344a9e7430d9e63a248d37afd9f

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:41:27 +07:00
Lars Greiss
0c156f71ba Added modded marginov color picker
-- Adapt for Preference being part of support library

Change-Id: Ic721fdc7f63607d972d203e1a13097e8870bce2f
2019-10-03 19:40:34 +07:00
ezio84
64483f2bd5 CustomSeekBar: fix progressbar glitch with custom min-max values
when CustomSeekBar is called, it does:
mSeekBar.setMax(mMax - mMin);
assuming mMin=0 and mMax=100 if they are not set with settings:min or max
through the related menu xml.
So if we set one of those values in the related menu java class with the
available public voids (setMax(value) and setMin(value)) the seekbar doesn't
get the new min and max thus the user can't slide it to the max position.

To reply:
- set settings:max (or android:max according to your customseekbar implementation)
to the wanted value, e.g. 255;
- set the min value through your menu java class with CustomSeekBarPreference.setMin(value);
- try to move the progressbar thumb to the max position, it won't reach it.

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:40:14 +07:00
dwitherell
005717276e Fix seekbar attribute grabbing *also remove from attrs as we have always used android: for max
Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 19:39:55 +07:00
d34d
88870041dc Add CustomSeekBarPreference
Change-Id: I374ceb023a418f72778539d1c227ee987b3978a1

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 12:28:43 +07:00
Danny Baumann
dd31238803 Add back a helper pref that holds a system setting.
nitrogen edits : update for O and remove never used checkbox prefs

Signed-off-by: xyyx <xyyx@mail.ru>
2019-10-03 12:26:24 +07:00
hungphan2001
7d9b211eb1 Init Cherih 2019-10-03 12:21:20 +07:00