Comments (12)
It did not scroll automatically because the sample application's manifest did not add a flag to re-layout when the input method is shown.
So when the input method is in screen, editor's size is not changed and when you can not see the characters, they actually are still in the editor's considered visible area.
Add
android:windowSoftInputMode="adjustResize"
to the editor's activity will solve the problem.
And the issue about long text's visibility is really a bug, I'll fix it soon.
Thanks for your feedback.
from sora-editor.
In Aide bad Code editor.
In MT Manager cool Code editor
Yes, I agree with you.
MT Manager's editor is quite smooth.
from sora-editor.
android:windowSoftInputMode="adjustResize"
Work, but edittext layout blinking, when keyboard shows and hides. Maybe you take a look this idea?
https://github.com/MrIkso/CodeEditor/blob/master/codeeditor/src/main/java/com/mrikso/codeeditor/view/FreeScrollingTextField.java#L1289
from sora-editor.
I do not really understand what is 'blinking'.
This attribute works well on my device.
Could you please give a little description or gif to help me know it better?
I'll view the code in your link.
from sora-editor.
Video
https://drive.google.com/file/d/1Dp8Hpy8L7cw6LBf-z5jUD7--mZ5NeiWo/view?usp=drivesdk
this will be clearly visible with a dark theme in the editor.
from sora-editor.
It seems to be caused by the system policy.
When the input method is still in animation, the layout of activity has already been resized.
I can not solve this in editor.
You may apply a dark theme to the activity and editor to cover this.
from sora-editor.
I can not solve this in editor.
@Rosemoe that's why I propose to do everything by auto-scrolling in the code, as in the example above
from sora-editor.
There is a similar method in my editor as well.
And when the 'drop' in your editor is not shown, they have the same ability. And it is called each time the text/selection changes to make the right selection visible.
Padding is not supported in my editor now, so it is safe to use getHeight/getWidth directly.
That's why I can not find where the problem is.
https://github.com/Rosemoe/CodeEditor/blob/c0c9e1e62f80bbd4ca9ad169618ad50319e6618d/editor/src/main/java/io/github/rosemoe/editor/widget/CodeEditor.java#L1750
from sora-editor.
I have observed some other editors such as AIDE's and MT Manager's.
They are getting the same problem as mine.
If I open the switch to make animations 4x longer, it is very obvious.
At the beginning of a input method's entrace or exit, the layout is resized.
I do not know what is the situation in your editor because I can not get my computer to compile a project with androidx.
And mobile QQ's policy is interesting, it has a delay until the layout resize. But this can not solve the problem from the source and it is not very easy to do the delay because usually we have to use onSizeChanged() to know whether the keyboard is shown. If adjustPan is applied to the window, the size will not be changed and onSizeChanged() will not be called. If adjustResize is applied to the window, we will have to recover the size of layout on the first time onSizeChanged() has a smaller height than before. But that will cause onSizeChanged() to be called again and we do not whether it is caused by the keyboard.
It also has the problem that this can not adaptes to various input method applications and if a user choose to disable the animation, the delay can be annoying.
from sora-editor.
Now I have viewed another editor modified from text warrior. It also has the problem.
from sora-editor.
@Rosemoe
In Aide bad Code editor.
In MT Manager cool Code editor
from sora-editor.
The layout flash problem will not be fixed in editor's code. Users may solve it by themselves.
from sora-editor.
Related Issues (20)
- Animation delayed in AutoCompletionWindow
- Help HOT 8
- Add support for customizing background color in symbol input button. HOT 1
- How to add icon to the line HOT 4
- create a language HOT 1
- EDITOR-LSP error in server side due to absolute uri passed by client HOT 1
- [Help Wanted] Create `Content` from InputStream instead of CharSequence/String HOT 2
- buggy selection and scrolling in ViewPager HOT 5
- Feature: built-in git and GitHub support HOT 2
- @drawable/magnifier _background Not Found HOT 3
- Enhance support for RTL languages
- Sticky scroll window should be hidden on select all HOT 2
- Invalid cursor placement after "Format code" action
- Add Support for Mouse Motions
- Add Support for Lens mode
- Add support for markdown viewer HOT 1
- Better control of the fast scrolling handle
- The code or text does not appear when using EditorColorScheme HOT 2
- Question: delete,empty line HOT 3
- Issue:Failed resolution of: Lres/Hex;
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sora-editor.