Share My Creation Simple NotePad

tdocs2

Well-Known Member
Licensed User
Longtime User
Hello, Klaus.

Once again, thank you for your contributions to the forum.

I was reviewing the Notepad project and have a question. I created a long txt file and loaded it into the Notepad. My test device has no external keyboard and depends on the Android softkeyboard. Since the edtPad in Notepad is an edittext, the softkeyboard covers the bottom of the edtpad. As a user, I am unable to see what I would be typing if I am appending text to the end of the file loaded.

Any suggestions/solution to this issue?

Thank you and best regards.

Sandy
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Thank you, Klaus.

I know one of your strengths is ScrollView... If you have Kingston Office (free), notice the fast scroll on the text and the consistent ability to see the complete text. The fast scroll suggests the use of ScrollView....

I think an edittext (multiline) cannot be added to a Scrollview, so how does Kingston do it - use a label and mimic an edittext? This is above my tech skills. I am trying to build a specific purpose text editor for my app and I have it working great except for the softkeyboard issue which is a show stopper. The problem does not seem to manifest on a new file- only when a file is opened.

Any ideas on combining scrollview, label and edittext to address the problem?

Best regards.

Sandy

PS:
Going back to the edittext and the softkeyboard behavior, Erel's tutorial on the IME says that it should work, but you and I have experienced otherwise.

Per Erel's tutorial on the IME,
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Klaus - Update Refer to:

https://www.b4x.com/android/forum/threads/handle-the-soft-keyboard-with-the-ime-library.14832/

Have not yet fully tested (modified) but the example Erel gives seems to work better - I have to add an "Open" to load a large txt file and see how it behaves, but I have done multiple pastes of text on the edit text on the left side of the activity (which would be the one that resembles yours and mine).

Please take a look and see if you see something I do not see. I do not fully understand the two events Erel is using and the order in which he has them (preceeding Activity_pause)...

Sandy
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Hello, Klaus.

I modified Erel's IME program and I got it to work. The modified app in zip below.

I tested it on 2 devices and it works. I hope this is of help to someone.

Note per IME xml:


Best regards.

Sandy
 

Attachments

  • IME Modified.zip
    347.8 KB · Views: 379
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…