Home: move the threshold slider under the gauge and slim it down#139
Merged
Conversation
On the Mate 10 Pro home screen the critical/warning RangeSlider block sat at the bottom and ate vertical space, squeezing the scrollable details table. - Move the threshold block (slider + Critical/Warning captions) from the bottom section up to directly under the battery gauge it controls; the details table now gets the reclaimed room. IDs are unchanged, so MainActivity needs no edits. - Add a shared Widget.App.RangeSlider style (applied to both the home slider and the Settings BatteryRangeSliderPreference) so the two stay in sync. Material 1.14 defaults to tall bar thumbs and a tick dot per step (40 over 10-50), which looked noisy; the style hides ticks and the end stop-indicators, uses a compact round thumb snug to the track, and drops the floating value bubble (the captions already show the values). - Remove the redundant "Battery Alert Levels" title from Settings (the category header already labels it) and delete the now-unused battery_range_title string (en + ar); shrink the captions and tuck them closer to the slider. - Balance the gauge box: the CircularProgressBar is a square taller than the bottom-open horseshoe, so the old +10/-10 margins left more space above the arc than below. Retune the top margin so top/bottom spacing matches. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #135.
On the Mate 10 Pro home screen the critical/warning RangeSlider block sat at the bottom and ate vertical space, squeezing the scrollable details table.
Changes
MainActivityneeds no edits.Widget.App.RangeSlider, applied to both the home slider and the SettingsBatteryRangeSliderPreference, so the two stay in sync. Material 1.14 defaults to tall bar thumbs and a tick dot per step (40 over 10–50), which looked noisy; the style hides ticks and end stop-indicators, uses a compact round thumb snug to the track, and drops the floating value bubble (the captions already show the values).battery_range_titlestring (en + ar). Shrink the captions and tuck them closer to the slider.CircularProgressBarmeasures as a square taller than the bottom-open horseshoe, so the old+10/-10dpmargins left more empty space above the arc than below. Retune the top margin so top/bottom spacing matches, without overlapping the toolbar.Testing
Built and installed on a Huawei Mate 10 Pro (Android 10). Verified on-device: slider sits under the gauge and adjusts thresholds live (gauge colors + captions update), the details table is more visible, Settings matches the home slider, the gauge is vertically balanced, and Arabic RTL looks correct.
🤖 Generated with Claude Code