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.
See #1691
Yeah, so I thought this would be easier - it's not done yet.
I used
android.text.style.ReplacementSpan
to render a gray "•" in place of spaces. This works really well everywhere except around line wraps - which were the whole reason I wanted this in the first place. This is the current state of the code (see first image). The main, almost trivial change for the feature itself is in fc43527. In the 2 commits before that I reworked the coloring code a bit - I believe for the better.It's easy to get the looks right by swapping the underlying space character to something else and rendering that as gray dot (see right image). This is problematic because copying the text then has that other character and no spaces in it. You can easily fix this for the copy button, but I'm not sure about manual text selection and the cut/copy popups.
I'm going to keep working on this to try and find something that works. Until then, maybe someone else has a good idea or has some use for what I've done so far.