Share My Creation Simple NotePad

I was missing a simple NotePad on my Android device to write simple reminder notes.
So I wrote my own.
I share it here eventhough it's a very simple one.

The program needs following libraries:
- AHLocale
- Dialogs
- IME
- StringUtils (shipped with B4A)

Bug reports and suggestions are welcome.

Best regards.

EDIT: 2012.06.04 Version 1_1
Added some improvements.
Added multilanguage (english, french and german).
To add a new language you can read one of the notepad_xx.txt files
translate it and save it as NotePad_yy.txt
yy= ISO language code
can be done directly in the program.
The language is automatically chosen by the program using the AHLocale library looking for the current language code.

EDIT: 2012.08.28
Added :
- automatic screen adaptation
- landscape orientation

EDIT: 2012.12.05
Added:
- AutoScale

EDIT: 2013.05.31
The user can now choose a language different from the default device language.
Added notepad_ja.txt Japanese language thank's to alfcen
Added notepad_ar.txt Arabic language thank's to Beja

EDIT: 2013.06.01
Added notepad_tr.txt Turkish language thank's to sigmoid
Added notepad_es.txt Spanish language thank's to Google
Added notepad_it.txt Italian language thank's to Google

EDIT:2013.06 V2.2
Some minor changes

Best regards.
 

Attachments

  • NotePad_1.png
    NotePad_1.png
    32.5 KB · Views: 18,447
  • NotePad_2.png
    NotePad_2.png
    47.8 KB · Views: 1,990
  • NotePadV2_2.zip
    41.1 KB · Views: 2,405
Last edited:

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,
Handling the screen size changed event When the keyboard opens the available screen size becomes much shorter. By default if the EditText is located near the bottom of the screen, Android will "push" the whole activity and make the EditText visible. This mode is named "adjustPan" mode.
 

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:

IME.xml - version 1.05
IME : Activity object
AddHeightChangedEvent
Method
Enables the HeightChanged event. This event is raised when the soft keyboard state changes.
You can use this event to resize other views to fit the new screen size.
Note that this event will not be raised in full screen activities (an Android limitation).
Returns : Void

Best regards.

Sandy
 

Attachments

  • IME Modified.zip
    347.8 KB · Views: 374
Last edited:
Top