Comments (5)
@niendo1 Thank you for the support. I also resolved issue using the below method override into the RichEditor class.
I just give the focus again to editor.
@OverRide
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
if (hasWindowFocus) {
requestFocus();
post(() -> {
InputMethodManager imm = getContext().getSystemService(InputMethodManager.class);
imm.showSoftInput(this, 0);
});
}
}
I think this is the correct way to get again focus get into the editor.
from richeditor-android.
I can confirm that...
from richeditor-android.
can you try webView.requestFocusFromTouch() before setTextColor(). Sometimes it brings back the keyboard, but not always..
from richeditor-android.
if you use the latest commit:
implementation 'com.github.niendo1:richeditor-android:a82b781ac1'
something like this helps:
@Override
public boolean onResult(@NonNull String dialogTag, int which, @NonNull Bundle extras) {
if (which == BUTTON_POSITIVE) {
switch (dialogTag) {
case DLG_HTML_TXT_COLOR:
lastTxtColor = extras.getInt(SimpleColorDialog.COLOR);
editText.requestFocusFromTouch();
editText.setOnJSDataListener(value -> {
editText.requestFocusFromTouch();
editText.setTextColor(lastTxtColor);
});
editText.getSelectedHtml(); // just a dirty Hack!
return true;
It seems, when the dialog is calling onResult, the dialog still prevents the focus to the editor.
But with this hack its working on ImapNotes.
New version will be released in the next days/week.
from richeditor-android.
Cool!
I added the fix in commit a32bc31. And it works so much better!
from richeditor-android.
Related Issues (4)
- Cannot Import to Project HOT 1
- Inserting a Base64 image HOT 3
- Error while Dexing Null Pointer HOT 2
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 richeditor-android.