Share My Creation Simple NotePad

klaus

Expert
Licensed User
Longtime User
Hi alfcen and Beja,
May I ask you a favor ?
I have modified a bit the program. Now the user can choose a language different from the default language.
For this I added the two sentances below at the end in the language text files.
Select language
Automatic

Could you please add this in your files and send them back to me ?

Attached the new version, it copies automatically language files if there are more recent ones in the DirAssets folder.
Could you please test it ?
The program needs now also the MLfiles library.
I will update the program in the first post when I have your new files.

Thank you in advance and Best regards.

EDIT: Source code removed, first post updated.
 
Last edited:

alfcen

Well-Known Member
Licensed User
Longtime User
Japanese

Hallo Klaus,
Here you are with the Japanese file.
 

Attachments

  • notepad_ja.txt
    483 bytes · Views: 313

Beja

Expert
Licensed User
Longtime User
Hi Klaus..

Done! (here).
 

Attachments

  • notepad_ar.txt
    557 bytes · Views: 298

Beja

Expert
Licensed User
Longtime User
tried to compile the new version, and got this msg:

Convert byte code - optimized dex. Error
A referenced library is missing: jcifs
 

klaus

Expert
Licensed User
Longtime User
@alfcen
Thank you Robert for updating the file.

@Beja
Thank you for updating the file.
The missing jcifs was needed with the MLfiles library, it's no more the case I removed it, It doesn't do what I need.

The new version is updated in the first post.

Best regards.
 

Beja

Expert
Licensed User
Longtime User
Klaus,
Sorry but it is still asking for that file.. can't finish compile.. tried many
times.
 

klaus

Expert
Licensed User
Longtime User
Strange
I redownloaded the NotePadV2_1.zip file from the first post, unziped it and compiled it with no problem.
What version are you testing ?
You should download the last version from the first post !
If you see MLfiles library checked you don't have the right version !

Best regards.
 

Beja

Expert
Licensed User
Longtime User
you are right,
the version was wrong.

but now! so many errors,
1- Setup error:
setup initlanguages(B4A Line: 94)
spnLanguage.SelectedIndex = MainLanguage.SelectedIndex = Main.Language1
java.lang.NullPointerException
Continue?

Setup (Language)
just one of the error msgs.. another error msg when trying to initialize
any language.. line 58

If orientation is changed to landscape, then can not return to portrait.

==
My laptop is Lenovo Z580, 750GB HDD, and 8GB RAM. with Windows 8.
B4A 2.71
 

sigmoid

New Member
Licensed User
Longtime User
Hi Klaus

This is Turkish language file.
 

Attachments

  • notepad_tr.txt
    427 bytes · Views: 282

klaus

Expert
Licensed User
Longtime User
@Beja

I Have no problems.
To make a full test I did:
- downloaded version 2.1 from the firest post in a new folder
- unziped it
- deleted all notepad_xx.txt files from the DirRootExternal/NotePad folder
- deleted the programs data
- unistalled the program
- ran the program from the IDE.

It works on both my devices Nexus One and Asus TF700, also screen orientation.
The only drawback is you need to redefine the options in the Setup and move the icon on a screen.
So I don't know what happens on your material.

Best regards.
 

nypaulie

Active Member
Licensed User
Longtime User
text sizing

Klaus,
Here's an update for you on text sizing. I've been using your NotePad program on my rooted Nook Simple Touch eReader to keep a listing of what pages I'm on in the various books I'm currently reading. (The ST bookmark feature is not always reliable.) I needed a really large sized text 'cause the Simple Touch screen is pretty small. I made a discovery. When I run NotePad on a tablet I can easily change the textsize using the Setup function and once it is changed it "remembers" that setting for next time, but on the Simple Touch the Setup function does not even bring up the screen for the changes. Must be the hardware. Anyway, If I get the larger text size I want using the tablet program I found I could sideload the file to my ST and bingo, large text. Just reporting this for anyone who has the same stuff I do and can use this info. Thanks again Klaus for your great contributions!
Paul
 

klaus

Expert
Licensed User
Longtime User
... but on the Simple Touch the Setup function does not even bring up the screen for the changes.
What do you mean with this ?
Does it mean that whan touching the SETUP button nothing happens ?
Do you see the SETUP button ?
What is the screen size of this device ?

Best regards.
 

nypaulie

Active Member
Licensed User
Longtime User
What do you mean with this ?
Does it mean that whan touching the SETUP button nothing happens ?
Do you see the SETUP button ?
What is the screen size of this device ?

Best regards.
I had correctly configured the heights & widths for this 6.5" x 5" (608 x 520) screen already so all the buttons show. When I touch the SETUP button the screen goes blank for a split second and then brings up the LOAD screen. This only happens on my Simple Touch Nook - when I run NotePad on my 9.7" HP Touchpad (1024 x 768) everything functions without issue. My only guess is that the Simple Touch has hardware that is getting in the way. I DO use Android on these units having rooted both of them. I didn't post this as any kind of complaint Klaus! I have managed to work "around it" and am happy with the result... just wanted to let you in on this. Ever get any messages from other Simple Touch users? I guess we are few in number - at least from what I can see from poking around the web forums.
 

nypaulie

Active Member
Licensed User
Longtime User
Height of panels..

Klaus,
Is it possible to change the panel height settings while running the program? Could 2 choices be added to the code with a menu button for each? The reason I ask and would want this is that when I go from portrait to landscape or the reverse, my panel height needs to be adjusted to fit the screen. An alternative would be some coding that would do this automatically depending on the orientation (which would be even better).
 

nypaulie

Active Member
Licensed User
Longtime User
What version are you using ?
In version 2.1 the panels were adjusted to the screen size in both orientations.
I uploaded my latest version 2.2 in the first post.

Best regards.
I've been using V 2.0. I just downloaded 2.2 and will run this one later. Thanks!
[Added Later] - Yes Klaus, this version (2.2) takes care of the sizing when orientation is changed. Good job!!!
 
Last edited:

lorebarita

Member
Licensed User
Longtime User
Thanks very much for the example. However I have a different question that i want to ask you. I have a large application I have done already in english and I want to localise it by including two more languages, would you advice me which is the most ideal way to go about it
 

klaus

Expert
Licensed User
Longtime User
You could use different solutions:
- The simplest way, at least for me, is using simple text files, one for each language, with the different words and sentances, like:
Yes
No
Exit

Load the relevant file according to the selected language in a String array, I use Texts. That's what you find in the NotePad.
You must add a routine to update all texts in views like this btnYes.Text = Texts(0) instead of btnYes.Text = "Yes".
Change every line where you use any text replacing "some text" by Texts(x).

The text file structure could be more 'sophisticated' like
English German
Yes=Yes Yes=Ja
No=No No=Nein
Read the text file into a Map, and get the items with mapTexts.Get("Yes").

You should also look at the threads below for other methods.
- Multi Language Support
- Localize your app using AndroidResources

Best regards.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…