Make the TextView API more extensible
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently TextView
only supports syntax highlighting through SetXXXColor(List<System.Rune> line, int idx)
APIs, which doesn’t even tell us what line we are on. This blocks 2 things in our use-case:
- Syntax highlighting for languages where tokens can span multiple lines.
- Highlighting the background of the currently executed statement in a debugger, which needs a line number.
Describe the solution you’d like
Expose all lines and the currently highlighted line index in some way. If the API was SetXXXColor(List<List<Rune>> lines, int lineIndex, int columnIndex)
, it would be a huge improvement and could technically solve both issues. Tho I understand that this isn’t too nice of an API either.
Describe alternatives you’ve considered I’m not familiar with other existing APIs that aren’t too specific to syntax highlighting, so can’t think of any.
Issue Analytics
- State:
- Created 4 months ago
- Comments:11
Top Results From Across the Web
android - How to add multiple expandable TextViews
In my layout I made a LinearLayout with multiple ScrollViews in it, it's supposed to hold a FAQs section there, in the Scrollviews...
Read more >Autosize TextViews
With Android 8.0 (API level 26) and higher, you can instruct a TextView to let the text size expand or contract automatically to...
Read more >Expandable Text View Using Kotlin and Android Studio
Expandable Text View is an android library that allows the users to create the text view which can expand and collapse to read...
Read more >Expandable TextView with LayoutTransition. Part 1
My goal was to get required expanding functionality for regular TextView class with the help of LayoutTransition.class.
Read more >How to truncate text in your Android app effectively
Expandable text with “read more” action in Android — not an easy task ... Why it can get tricky to add expandable text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think its ok to make a new Type for
TextModel
. Its a 2 property class so no big deal to just haveTextModelCell
or something if it makes things easier.Thanks for taking this work on @BDisp I think its gonna be pretty awesome.
This is a great idea. I’ll explore it. Thanks.