Commit Graph

45 Commits

Author SHA1 Message Date
mxyyiyi
9ba79d8b02 [Expressive Battery] Migrate tips card in battery usage to banner message
- Update card preference: Update icon hint color by banner attention level
- Remove redundant color token: Use the existing Material yellow as a warning color

Bug: 349652542
Test: atest BatteryTipsControllerTest
Flag: com.android.settingslib.widget.theme.flags.is_expressive_design_enabled
Change-Id: I35730eb4716e9dbd712c22db63490e8bc06fc482
2025-02-19 10:33:13 +08:00
Marcelo Arteiro
8577c10535 Migrate materialColor* attributes into colors
The new color were already introduces in a previous CL ag/30322786

This CL is about replacing the attribute usage by the new color resources, which should work the same but cannot be overwritten, or styled, guaranteeing consistency across the OS.

The old attributes will be removed in CL: ag/29910036

Bug: 374273611
Test: presubmit
Flag: EXEMPT Un-flaggable refactor of private color resources
Change-Id: I05b5261054bcb6de40e4e40d633025495f3dd01f
2024-12-06 16:55:33 +00:00
Matías Hernández
246960de0c Update top of modes page
* Show blurb based on mode type.
* Make the icon bigger and highlight it when mode is active.
* Increase spacing between elements.

Also eliminate some code duplication between header of mode page and header of icon picker.

Fixes: 355415875
Test: manual
Flag: android.app.modes_ui
Change-Id: I7e788b9b5920cedb791d1571b19b37e65ece6d0b
2024-07-25 21:28:27 +02:00
Matías Hernández
c2d2de085d Changes to icon picker for reusability in "add mode" flow
* Don't finish the fragment from the controller (ugh!) instead just report the selected icon via a listener.
* Highlight the selected icon in the list.
* Cache the icon drawables (since we're using selectors for the colors, we don't need to swap them, one per icon resource id is enough).
* Improved the tests a bit too.

Bug: 333901673
Bug: 326442408
Test: ates
Flag: android.app.modes_ui
Change-Id: Ib2ec7a7e3ed99b13f9264aa6f7c209ee3f6967a0
2024-06-26 11:38:56 +02:00
Yuri Lin
4203f311dd Add schedule setting page for time-based modes.
Creates new layout for setting the start & end time, and days of the week, for a schedule-based mode.

This is close to the mocks specified in https://screenshot.googleplex.com/8zmb7PAjjt73VkN, but with the following differences:
- the end time is left-aligned with the center rather than on the right side of the screen. This is a side effect of using LinearLayout to evenly space start & end times, and could in theory be fixed by using a ConstraintLayout, but that option seems to cause times to overlap instead of wrap when display size is cranked up. Could be fixed later.
- no icons yet on either side of the time display
- no Done button. Instead, has the "exit at alarm" switch that exists today.

Have not yet checked how this interacts with TalkBack, etc.

Flag: android.app.modes_ui
Bug: 332730302
Test: ZenModeSetSchedulePreferenceControllerTest, ZenModeExitAtAlarmPreferenceControllerTest, ZenModeSetTriggerLinkPreferenceControllerTest
Test: manual: interacting with UI in normal size, with font & display at minimum and maximum, and in locales (fr) where the first day of the week is a different day
Change-Id: I0b76f55891d6c12fc27720657c9eea6fe42fbafe
2024-06-10 13:26:06 -04:00
mxyyiyi
03fdbbe504 Use material color res from settingslib for battery tips card
Settings Anomaly Card
[Before-Dark] 	https://screenshot.googleplex.com/5PZC6mbWjqunvuv
[Before-Light] 	https://screenshot.googleplex.com/7eoF6yLX6t3JeHz
[After-Dark]  	https://screenshot.googleplex.com/5j4mQFDXjkVcxHs
[After-Light] 	https://screenshot.googleplex.com/5ySzfzft9293GXb

App Anomaly Card
[Before-Dark] 	https://screenshot.googleplex.com/JKkcqCiAKxkPZds
[Before-Light] 	https://screenshot.googleplex.com/ASB4CnDhPjsQohH
[After-Dark]  	https://screenshot.googleplex.com/5y3LVvng54vndi9
[After-Light] 	https://screenshot.googleplex.com/NCJeuViCtDcNhiV

Bug: 339130556
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I29d68713c14068fd9961082a148dd02ad38289a6
2024-05-07 13:51:32 +08:00
mxyyiyi
1817f066ec Update Power Anomaly UI.
For Settings tip & app anomaly banner:

- update app anomaly hint color in dark/light theme
[Banner card]
- update icons to GM3 style
- update text font and button text color
- update button style from outlined to filled.
[Chart view]
- update warning icon size
- update percentage label alignment

Screenshots:
- [Settings]
[light]	https://screenshot.googleplex.com/ERWkD7TmDsLaxdG
[dark]	https://screenshot.googleplex.com/6JKvL5vEQTZtJfd
- [App]
[light]
https://screenshot.googleplex.com/3YoncDhGTzUcAZA
https://screenshot.googleplex.com/3hbGmqoYWSy9H9U
[dark]
https://screenshot.googleplex.com/9XKs8tXmRKL2jJP
https://screenshot.googleplex.com/SU4LTJYWXvpd42r
- [RTL+L10N][Arabic]
[Settings] https://screenshot.googleplex.com/V9HJkPcsoBJmsW8
[Apps]
https://screenshot.googleplex.com/B49VKy2jaZYisWK
https://screenshot.googleplex.com/6VZQ2gESRes8RMH
- [Force RTL][EN]
[Settings] https://screenshot.googleplex.com/4V7coyLf5ueUcGv
[Apps]
https://screenshot.googleplex.com/9UaERwDmrpitqdq
https://screenshot.googleplex.com/3JDfcXi8pmz5Mew

Bug: 309569299
Test: manual
Change-Id: I8bee7f86d602112e0cbbd936b439330aaff7275c
2023-11-13 11:52:44 +08:00
mxyyiyi
c4fb17d740 Impl app anomlay preference
[ScreenShot]: https://screenshot.googleplex.com/BBrHTQbwbFHxZE9

Bug: 291689623
Bug: 291689643
Test: manual
Change-Id: Ia257f3ace4a2d71b2221f861be3e1238de6d791e
2023-09-01 06:40:36 +00:00
Lucas Silva
94b5a9e147 Fix colors for dreams settings according to new spec
Fixes: 279780657
Test: open settings > display > screen saver and verified colors are
correct in both light/dark modes

Change-Id: Ibb2ba40807c937161f4dfa565f10d0ca2fb35549
2023-05-01 15:21:11 -04:00
Marcelo Arteiro
c5631b45b2 Automated Token Alignment Android/Material
Resubmiting reverted CL Ia1f84669090e04b3a2aaac82bb5971032d74a125.
Reson: Bug was found in another CL (in this topic)

Test: Treehugger
Bug: 268682423

Change-Id: I0fead8915b2bb6281e29b32f7426c35b0138b10e
2023-03-31 10:53:24 +00:00
Marcelo Arteiro
1b599e0232 Revert "Automated Token Alignment Android/Material"
This reverts commit c9ca4a9014.

Reason for revert: Black Search Box in Settings App (Light Theme)

Change-Id: I936e977ce044b8da41d818d6b3392adc6fd1e4e6
2023-03-09 23:40:40 +00:00
Marcelo Arteiro
c9ca4a9014 Automated Token Alignment Android/Material
Test: Treehugger
Bug: 268682423
Change-Id: Ia1f84669090e04b3a2aaac82bb5971032d74a125
2023-02-17 15:14:30 +00:00
Chaohui Wang
a45ecb8034 Clean up some UnusedResources detected by lint 8
Bug: 234570979
Test: Make Settings
Change-Id: Iaf044fdc4cfcf1eab172f0735c5c7f0330a46107
2022-12-02 14:59:44 +08:00
Chaohui Wang
7ef27fbe85 Clean up some UnusedResources detected by lint 4
Bug: 234570979
Test: Manual with Settings App
Change-Id: Icc21ef3bedc7a39e7841271f51b77e9b543f6f0f
2022-09-13 20:00:38 +08:00
Chaohui Wang
6ae88c417f Clean up some UnusedResources detected by lint 3
Bug: 234570979
Test: Manual with Settings App
Change-Id: I73d18397b01a9967fd7acb94b133e7d5497a0854
2022-09-13 13:56:26 +08:00
Chaohui Wang
28d838d5e7 Clean up some UnusedResources detected by lint
Bug: 234570979
Test: Manual with Settings App
Change-Id: I2ad634d9beba623a5cdcff015c9aa28d78525cb7
2022-09-09 16:51:12 +08:00
Jason Chiu
880471a1b0 Renew the highlight state color
Fix: 230283855
Test: visual
Change-Id: I725422518d07a0b0676731bd9da8384ab149ab1b
2022-04-25 15:34:42 +08:00
Lucas Silva
f7a95e4b5d Fix bug where not all views are getting disabled alpha applied.
This ensures that we apply the alpha recursively to all views when the
item is disabled/enabled.

Bug: 226573932
Test: locally on device
Change-Id: I28ee1a21227706d01a6e4f6284871bf78af983f5
2022-04-04 17:32:05 -04:00
Tsung-Mao Fang
f4514b9fbf Fine tune background color for dual pane in homepage
Follow the spec and change the background color.

Test: See the screen
Bug: 223329504
Change-Id: Ibcbf0e898ae949e1354f5af810a2347eba42b508
2022-04-01 13:35:17 +08:00
Lucas Silva
d9071dea25 Add master toggle to enable/disable screen savers
The new control toggles the Settings.Secure.SCREENSAVER_ENABLED setting,
which controls if a screen saver is enabled. Also removed the "Never"
option from the WhenToDream picker, since this is now controlled via the
toggle.

Test: locally on device
Bug: 222360260
Change-Id: Ibcf52b5e2d1ad0c295f32c4c18bfc89082d074ce
2022-03-08 10:27:59 -05:00
Lucas Silva
cf7338c1cf Apply proper icon tinting to dream icons
Test: locally on device
Bug: 222754771
Change-Id: I2998a37db4221f6beaeca591532ccc35d0992b86
2022-03-04 17:50:56 -05:00
Lucas Silva
75c44cd02b Update dream settings UX to match latest mocks.
Updates:
- removed individual complication toggle
- added single toggle which enables/disables all supported complications
- updated colors to match mocks
- updated grid padding in order to line up with existing content. Note:
  this required more complex padding logic, using an item decorator to
  apply the padding only to inner grid elements.
- updated preview image, removing view nesting to make better use of
  ConstraintLayout
- Updated some strings to match mocks

Test: locally on device
Bug: 217555053
Change-Id: I573e5f4ed807cbe2ae9e00f183d402e6e3339590
2022-02-15 17:32:01 +00:00
Lucas Silva
06e373dcb0 Add oobe dream settings activity
This activity will be displayed during the deferred setup wizard flow

http://recall/-/eh4NkVnIpkjUSU9uGPTn1S/dxeTM32hyJXN3nDKsRQfrZ

Test: locally on device
Bug: 215651884
Bug: 216195180
Change-Id: I9d8eef411a190cdbfc1a33d1bbbee61338ddd154
2022-02-01 19:10:16 +00:00
Lucas Silva
55df7acc51 Dream settings refactor.
We will be re-using the grid UI for the dream complication picker, so
this change refactors some of that logic so it can be re-used in the
complication controller.

We also update some of the UI here to match the most recent UX
decisions.

http://screen/BxhAwZwQSVoxUmN.png

Test: locally on device
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.dream.DreamPickerControllerTest"
Bug: 214250590
Bug: 215703483
Change-Id: I9fbfa0f0cd31ae3d119c7cd1a9562d4cdb203d6c
2022-01-27 19:51:32 +00:00
Lucas Silva
38d0a7ca91 Rewrite dream settings.
The available dreams will now be shown in a grid, with a preview button
at the bottom.

Screenshot (white placeholder image used):
http://screen/6pe6EoACPoQN8TZ.png
http://screen/4nR6Wg5pN7pL6Wb.png

Phone (single column layout):
http://screen/4WFqzZR8Yf9H3VZ.png

Colors and margins will be finalized once final mocks are done.

Bug: 207681076
Bug: 214250590
Test: locally on device
Change-Id: Ie68bdc60e74e72dc3c3cee3f1ffd40f5613109b9
2022-01-18 16:06:34 +00:00
Jason Chiu
7426ab7b9f Define menu keys for highlighting the menu entry on 2-pane UI
- Define an attribute for highlightable menu keys
- List the keys for Settings menu entries
- Support parsing the attribute

Bug: 199017944
Test: robotest
Change-Id: I5759bff591c79d498fffb8b2c2b57f2cb66c4421
2021-09-07 06:32:19 +00:00
jackqdyulei
8308274058 Add circle background outline to unthethered icon
Fixes: 124247230
Test: manual
Change-Id: I70f8158685134e2115f2a7baded983ebac6c8f1b
2019-03-15 12:40:58 -07:00
Salvador Martinez
2bb9930866 Update Settings components for dark theme
This CL updates the colors and properties of various themes and
widgets to make them follow dark theme UI. Specifically, it changes
the color accent and uses true black for the background.

Test: manual inspection
Bug: 111397440
Change-Id: I15214a4c5d4864244af856312d2fc3e3a7e7ce36
2018-11-15 15:00:44 -08:00
Raff Tsai
43a7b18f21 Modify Settings homepage layout
- Add BottomNavigationView which has two tabs
- Remove BottomSheet in layout files

Change-Id: I493290fa9dee0566c73c5c9d7fbba10b71b4e2b4
Fixes: 113266753
Test: visual
2018-09-05 11:55:16 +08:00
Cyril Lee
1b72815e9b Change fingerprint enrolling animation to 4 colors
This change includes two parts:
1. Change the scan animation from grey to 4 colors
2. Change the registered blink from blue to 4 colors

Bug: 75963029
Test: Manual
Change-Id: I0a0d68e82e8427bb46095461878502899f273bda
2018-04-25 16:00:40 +08:00
Andrew Sapperstein
38bf192ed6 Remove LinearColorBar and replace uses with ProgressBar.
We never actually needed it, since progress bar can do
everything we want it to. Renamed data_usage_progress to
color_bar_progress to reflect its more generic state.

Updated color_bar_progress to use proper values.
Since we can't seem to use private attrs in settings,
use the dimen/color values that are customizable.

Updated usages to use regular ProgressBar APIs.

Fixes: 74111937
Test: visual inspection and robotests
Change-Id: I4f0c59e6cf5c629e3cc3901800d9c4afc95fa495
2018-03-19 15:11:49 -07:00
Fan Zhang
730ea972d2 Search highlight polish
- Blink when starting highlight
- Extend highlight to 15 seconds
- Fade out when stopping highlight

Bug: 73313161
Test: visual
Change-Id: Ie6c3d640566f2eecc501d4c4f96df512171ff4b6
2018-02-26 14:48:13 -08:00
Fan Zhang
3d516e7607 Highlight row (instead of ripple) when come from search.
- Moved HighlightableAdapter to its own class
- Replaced ripple with blue background
- Bluebackground only stays for 5 seconds. After that it's replaced by
  ?attr/selectableBackground

Misc fixes.

- Fix NPE in UserSettings
- Update char limit on a new string

Change-Id: I4687e54e71fd7b9243f520b7630563df58be23d4
Fixes: 71715698
Fixes: 72761974
Test: robotests
2018-02-01 12:35:25 -08:00
Fan Zhang
46b5474be4 Update master switch style
- When off, background grey
- When on, background accent
- Switch toggle always white, only change the slider color during on/off

Change-Id: I0ca49439f4e20e75517d503f28cc3068930591e8
Bug: 69462439
Test: robotests
2018-01-10 15:52:20 -08:00
jackqdyulei
1240549591 Move AppListGroup to PreferenceController
Move the app list in battery settings to PreferenceController. So that
we can:
1. Clean the code in PowerUsageSummary
2. Make it easy to add/move the app list to other place in furture.

This cl:
1. Move and make it invisible since in P we don't show app list in
battery main page.
2. Move related test to BatteryAppListPreferenceControllerTest

Bug: 70234293
Test: RunSettingsRoboTests
Change-Id: Ice7a42394916ff5e71305bfe22f5c35868d87fc7
2017-12-08 10:21:54 -08:00
Malcolm Chen
d089db8d6e Revert "Delete unused classes"
This reverts commit 2fa45c92e6.
It bring back SlidingTabLayout.java which will be used for
multi-SIM configurations.

Bug: 65648147
Test: unittest
Change-Id: I84c75a2e1d33fc89f58165c662d82a8ad3d6ef20
2017-10-18 16:08:41 -07:00
Fan Zhang
2fa45c92e6 Delete unused classes
Change-Id: I014136b02ffc7f4d10ac450c9583b883c84d22a1
Fix: 32700131
Test: rerun robotest
2017-08-01 17:59:34 -07:00
jackqdyulei
f8e6f43425 Revamp battery Ui in low battery mode
This cl refine battery icon ui in low battery mode:
1. Should show indicator(fixed in ag/2035178)
2. Show bolt icon when charging
3. When battery is low, set battery background as red and indicator
as white.

This cl also includes the field updates for battery.

Bug: 36862496
Test: RunSettingsRoboTests
Change-Id: Ifb2ed339742119bbff78712df09288b895756b1f
2017-04-12 12:47:52 -07:00
Jason Monk
6fca98f905 Switch references to colorError
Test: make
Change-Id: I0ed10d78763642cecc5ba8e8e15a097d51280946
2017-02-24 14:57:31 -05:00
jackqdyulei
4f5e4931f1 Remove hardcode color of sliding tab
Now use the color from textColorPrimary based on
current theme.

Bug: 32592245
Test: Visual
Change-Id: If6bbfe3b39ba30d96fc1f7d810472dc87006c3ea
2016-11-07 10:16:35 -08:00
Maurice Lam
67df126291 [Fingerprint] Make enroll progress bar scalable
Make the fingerprint enroll progress bar scalable by moving it to a
single FingerprintProgressBar view and make it fill the remaining
space.

- The background fingerprint icon was changed to include the padding
internally so it can be added as the background directly onto the
progress bar view.
- The icon in landscape mode is also fixed to use the fingerprint
icon rather than the lock icon.

Test: cd tests/robotests && mm
Bug: 32123370
Change-Id: Ia5cf37d92f0af7c1cf39287f5070c44f51d44878
2016-10-20 17:20:56 -07:00
Fan Zhang
50cde75ef7 Update suggestion/support UI to use more negative space.
Bug: 28435214

-- Tweaked layout and padding in suggestions and support tab.
-- Added support to show different text color in SlidingTabLayout.

Change-Id: If5d90ec5360e35565176aae7475e355c27fcef7c
2016-05-12 11:14:59 -07:00
Maurice Lam
9fa8d9f248 [Fingerprint] Use accent color for fingerprint highlight
Set the fingerprint activated color, while registering a new
fingerprint to be 50% alpha of the accent color. This allows the
color to be changed with the theme, so that it will be highlighted
blue during setup wizard.

Bug: 21695577
Change-Id: Iee68506a4fbb8e8996bdb52694992ac460ae943d
2015-07-14 01:22:38 +00:00
Jeff Sharkey
8e987d9bfb Finish storage wizard theming.
Storage wizard screens now have updated assets from UX, and various
assets are tinted consistently.  We're using our own navigation bar
and wholesale replacing the layout from upstream.

Fix text colors in night mode.  Tell SystemUI when we're finished
with the wizard flow.

Bug: 21830731
Change-Id: Ic8d09cc152bfb4dcc6089b5c61d28cbdd4be3ee9
2015-06-16 15:28:49 -07:00
Alan Viverette
55eaa96fe4 Clean up usage of theme colors, deprecated Resources.getColor* methods
Change-Id: I34e11e0773c9f8e00e3eab422781094e19a16d3d
2015-03-18 18:10:52 -07:00