Fix webview jumping + other improvements, closes #2726#2736
Conversation
d3c16f5 to
c3bd617
Compare
|
Thank you @harshad1 ! |
|
Hence can't be merged |
This is ready for review and merge |
| }); | ||
|
|
||
| // listView.setOnItemLongClickListener((parent, view, pos, id) -> directActivate.callback(pos, true)); | ||
| listView.setOnItemLongClickListener((parent, view, pos, id) -> directActivate.callback(pos, true)); |
There was a problem hiding this comment.
@guanglinn It looks like this was disabled accidentally by an earlier PR. Re-enabling it.
I don't think this breaks anything else
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toTopOf="parent"> | ||
|
|
||
| <ImageButton |
There was a problem hiding this comment.
@guanglinn I removed the close button and made it so pressing the search icon again closes the view
There was a problem hiding this comment.
Let me know if you think this is not clean. I can revert it
There was a problem hiding this comment.
No need to revert it I think. The screen space of mobile devices is precious, there is nothing wrong with removing it
| } | ||
|
|
||
| @Nullable | ||
| private static Editable getCurrentSearchText(final AlertDialog dialog) { |
There was a problem hiding this comment.
@guanglinn instead of neutralButtonCallback2 we fetch the search text from the existing dialog
|
@gsantner please let me know if you would like any changes @guanglinn would you be able to take a look at this code and do a quick review? I think this branch is ready to go |
|
Hello @harshad1 , |
| _hlEditor.setSelection(lastSelection); | ||
|
|
||
| // Restore scroll position for edit-mode | ||
| _hlEditor.setReflowCallback(() -> { |
There was a problem hiding this comment.
@guanglinn This was causing issues with jumping back to cursor position
I have removed it and reverted this bit.
Will try to re-add it in a future PR once I identify a better approach
There was a problem hiding this comment.
This code can effectively restore the scroll position for EditText.
Hope it can be re-added in a better approach
There was a problem hiding this comment.
Yeah it is a good idea
Note that the jump back to cursor only happens when we have layout affecting spans
So
- Bigger headings
- todo.txt
I am trying to add it back but more conservative
|
@gsantner I have fixed conflicts. Please merge |
This Addresses #2726
In addition I have included a number of general fixes and improvements