[android] Remove space for icons in Settings #1924

Merged
stloeffler merged 2 commits from settings-padding into master 2022-01-23 21:08:37 +00:00
stloeffler commented 2022-01-22 10:26:57 +00:00 (Migrated from github.com)

Override the the iconSpaceReserved property specified in the Android sources as none of the Settings items has an icon; hence the space is wasted and leads to the truncation of item names and descriptions. Inspired by https://stackoverflow.com/a/52960668.

Closes #1872

Override the the iconSpaceReserved property specified in [the Android sources](https://cs.android.com/android/platform/superproject/+/android-12.0.0_r4:prebuilts/sdk/current/support/v7/preference/res/values-sw360dp-v13/values-sw360dp-v13.xml) as none of the Settings items has an icon; hence the space is wasted and leads to the truncation of item names and descriptions. Inspired by https://stackoverflow.com/a/52960668. Closes #1872
biodranik commented 2022-01-22 21:28:02 +00:00 (Migrated from github.com)

Thanks! Did you try this non-hacky fix? https://stackoverflow.com/a/55987124/1209392

It would be also great to insert a comment into the XML with the description, why is it needed, and with a link.

Thanks! Did you try this non-hacky fix? https://stackoverflow.com/a/55987124/1209392 It would be also great to insert a comment into the XML with the description, why is it needed, and with a link.
stloeffler commented 2022-01-23 07:15:27 +00:00 (Migrated from github.com)

I did try the "non-hacky" fix as well and it works. However, it needs to be added to each item in the preferences XML separately. I.e., if a new preferences item is added, it will be indented by default unless iconSpaceReserved is manually set to false. By overriding the default as in the current version of the PR, this does not happen - all items (old and new) are unindented by default. However, if you prefer the non-hacky fix, I could easily adapt the PR.

By "insert a comment [...] with a link", do you mean a link to StackOverflow, to the Android sources, to the GitHub issue, or something else? (Note that there is some controversy about StackOverflow code licensing, see e.g. here and references therein).

I did try the "non-hacky" fix as well and it works. However, it needs to be added to each item in the preferences XML separately. I.e., if a new preferences item is added, it will be indented by default unless iconSpaceReserved is manually set to false. By overriding the default as in the current version of the PR, this does not happen - all items (old and new) are unindented by default. However, if you prefer the non-hacky fix, I could easily adapt the PR. By "insert a comment [...] with a link", do you mean a link to StackOverflow, to the Android sources, to the GitHub issue, or something else? (Note that there is some controversy about StackOverflow code licensing, see e.g. [here](https://softwareengineering.stackexchange.com/questions/170185/is-creative-commons-license-compatible-with-apache-license) and references therein).
biodranik commented 2022-01-23 07:42:18 +00:00 (Migrated from github.com)

Less work is better. We can merge the "hacky" fix, but please add a comment to it with a link to this issue.

Less work is better. We can merge the "hacky" fix, but please add a comment to it with a link to this issue.
stloeffler commented 2022-01-23 09:26:55 +00:00 (Migrated from github.com)

I added the comment (with description, rational, links, etc.).

I added the comment (with description, rational, links, etc.).
biodranik (Migrated from github.com) approved these changes 2022-01-23 10:57:25 +00:00
biodranik (Migrated from github.com) left a comment

Awesome, thanks!

Awesome, thanks!
This repo is archived. You cannot comment on pull requests.
No reviewers
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#1924
No description provided.