saikou | An Android Anilist client, which lets you stream & download Anime & Manga | Animation library
kandi X-RAY | saikou Summary
kandi X-RAY | saikou Summary
Saikou is crafted based on simplistic yet out-of-state elegancy. It is an Anilist only client, which also lets you stream & download Anime & Manga. Saikou (最高; Sai-kō) literally means the best in japanese. Well, we would like to say this is the best open source app for anime and manga on Android, but hey, Try it out yourself & judge!. NOTE: Please do not attempt to upload Saikou or any of it's forks upon the Playstore or any other Android appstores on the internet. Doing so may infringe their terms and conditions. This may result to legal action or immediate take-down of the app.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of saikou
saikou Key Features
saikou Examples and Code Snippets
Community Discussions
Trending Discussions on saikou
QUESTION
I would like to create a romaji to kana converter EditableText. That is to say, by writing "saikou" in an EditableText, the displayed text should for instance be "さいこう".
Currently, I got this working if the user keeps writing without wanting to edit his text (but the cursor is placed at the beginning of the text and not at the end due to a bad offset).
But as soon as the user moves the TextSelection manually (by taping somewhere on the EditableText), the cursor is finally well positioned, BUT when he tries to edit the text (adding or removing a character) the wrong offset causes a mess.
Example:
The use wants to remove the "こ". He moves the cursor here (represented by the pipe): "さいこ|う".But when he will hit the delete key, the "い" character will disappear instead. This is due to the difference in length between the original text (saikou) and the japanese translation ("さいこう"). The original text length is 6, but the japanese length is only 4. By placing our cursor like this and hitting the "delete key", we will try to delete the 3rd caracter which is in the original text the letter "i" and not "こ" as in the japanese translation.
Idea
I can write a function that will match the original offset to the corresponding japanese offset. But this will only be useful if I can prevent the default text deletion from happening and programmatically update the text in consequence. However, I cannot find a way to prevent the deletion. I've already tried to use the onChange method on EditableText but despite trying to return in the function, the modification still occurs. I've also looked at the EditableText's Controller and try to change the text when the listener is triggered but it causes an infinite loop because of a change in state in this listener.
Any help will be really appreciated !
...ANSWER
Answered 2020-Aug-25 at 14:10It's a bit tricky to comment without seeing any of the code, but let's see..
So, I had this solution set up in Javascript, and just ported it over to Flutter. Hope this helps out. This works for me regardless of whether or not the cursor was at the end when the typing began.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install saikou
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page