Share My Creation Simple NotePad

klaus

Expert
Licensed User
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

Last edited:

alfcen

Well-Known Member
Licensed User
Bonjour Klaus,

Looks great and as designed on my 640 x 960 screen!
Attached an icon for your NotePad.

Bonne nuit
Robert
 

Attachments

nypaulie

Active Member
Licensed User
Missing Library

Hi Klaus,
When I tried to "Compile & Run" I got the following:

Compiling code. Error
Error parsing program.
Error description: Unknown type: ahlocale
Are you missing a library reference?
Occurred on line: 18
Dim Locale As AHLocale

How do I reference that library?
Thanks.

Paulie

[Added Later]: I poked around and found this "AHLocale1_12.zip" - The missing lib is probably here... more later.
[Added Still Later]: Unzipping it gave me a file called AHLocale.jar but it wouldn't run in WinXP, so I tried to fix it in Linux, but could not make it executable, even as root. Guess I'm still stuck.
 
Last edited:

nypaulie

Active Member
Licensed User
You should copy this file and AHLocale.XML to the libraries folder (set in Tools - Configure Paths).
I was successful with my last compile/run Thanks! Now I want to try to reconfigure the layout so it will better fit my 1024x780 screen. I'll post an update if/when I'm successful. If you have any tips on resizing I would appreciate them. Thanks again.
 

nypaulie

Active Member
Licensed User
I was successful with my last compile/run Thanks! Now I want to try to reconfigure the layout so it will better fit my 1024x780 screen. I'll post an update if/when I'm successful. If you have any tips on resizing I would appreciate them. Thanks again.
Looks like you have to manually adjust the screen width, but the length fills in to the bottom without having to enter any number. I found the optimum width for the Nook Color is 604 and the HP TouchPad is 768.
 

nypaulie

Active Member
Licensed User
You could set the widths to 100%x.
An updated version supporting both orientations can be found in the first post.

Best regards.
Thanks! When was the second (updated) version added... I'm guessing it was after I loaded the first one, otherwise I would have seen it. By orientation are you referring to portrait/landscape mode? That would be great Klaus.
 

nypaulie

Active Member
Licensed User
Adding an "Exit" button.

I tried unsuccessfully adding an Exit button to the main menu with this code:

Sub btnExit
Exit
End Sub


Do I have to create an "activity" for this to work? And if so, what goes into the "resume" code, assuming the command Exit is in the start-activity one...
 

klaus

Expert
Licensed User
B4X:
Sub btnExit
   Activity.Finish
End Sub
You can exit the program the standard Android way clicking on the back button.

Best regards.
 
Last edited:

nypaulie

Active Member
Licensed User
Orientation Control

Klaus, you said that your updated program has the ability to determine orientation. Can you please tell me how you can control this. Is some coding required or is it done some other way?
Also, can this orientation choice be made by the user at runtime? Thanks!
 

klaus

Expert
Licensed User
Klaus, you said that your updated program has the ability to determine orientation. Can you please tell me how you can control this. Is some coding required or is it done some other way?
To check if the device is in portrait or landscape orientation just check:
B4X:
If Activity.Width > Activity.Height Then
  ' landscape
Else
  ' portrait
End If
Also, can this orientation choice be made by the user at runtime? Thanks!
Sure, just turn the device :)!

Best regards.
 
Top