-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line numbers bug #42
Comments
Hello @Plezha, Thank you for reporting this issue, I found that the number overlap issue is because the current code calculates the padding with constants values but now I have updated it to use the font size, and number length and tested it with smaller and bigger sizes, I will add the line break and improve line number drawing while sapping futures to the todo Try it in version 1.3.8 and feel free to write any suggestions, report Thanks |
Thank you for swift reaction and fix. Is there a way to try updated CodeView now? |
I also found another kind of related issue while using CodeView in HorizontalPager (which works over LazyRow): |
You're most welcome, I uploaded the new version to maven and it will take about 30m and you can use it |
Thank you for reporting it I will check it in the XML version then I will test it on compose, maybe we can create another version that is based on compose UI I will check them Thanks |
I'm looking forward to help you If you decide to create CodeView based on Compose |
That's great, once i start working on it you are most welcome to join |
Describe the bug
When line numbers is tirned on:
To Reproduce
To reproduce the behavior, try using line numeration
I used CodeView 1.3.7 with programmatic declaration in AndroidView:
Expected behavior
I expected line numbers to either disappear completely or not disappear at all while swiping code to the right but it does neither (see attached video).
Also, even 2-digit line number overlaps code if using same text size.
device-2023-03-27-003432.webm
Smartphone (please complete the following information):
Device: emulated PIxel 6
OS: Android 13 (API 33)
Device: real Xiaomi Redmi 4 Pro
OS: Android 6 (API 23)
Additional context
I would also like to know if it possible to let "actual" lines to go to next "visual" lines when getting out of view's bounds (something like line break). I have implemented it in Compose if that can help somehow
Tried making my own highlighter with Compose but found no way to use AnnotatedString in editable text composables.
The text was updated successfully, but these errors were encountered: