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: 17,969
  • NotePad_2.png
    NotePad_2.png
    47.8 KB · Views: 1,699
  • NotePadV2_2.zip
    41.1 KB · Views: 2,001
Last edited:

nypaulie

Active Member
Licensed User
Text Size

I love this program and am using it in both my tablet (10") and my little Simple Touch Nook eReader. I wanted to increase the text size for the Nook one, but no matter what I change it to it remains the same. I tried to make the text "Bold" and that worked (so I know this is the correct place to make the changes), but the size cannot apparently be changed. What am I doing wrong?
The text I am referring to is that which is displayed in the body of the file when that file is selected.
 

klaus

Expert
Licensed User
You can change the text size in the setup.
Currently the values go from 14 to 18.
If you want to increase the list you can do it in this routine in the setup module.
B4X:
Sub InitTextSizes
    Dim i As Int
   
    spnTextSize.Clear
    For i = 0 To 4
        spnTextSize.Add(i + 14)
    Next
End Sub
Change 4 to a bigger value.
You could also increase 14 to increase the min value.

Best regards.
 
Last edited:

nypaulie

Active Member
Licensed User
Coding the text size...

Thanks for the response, but sorry but after altering the code to extend the "0 to 4" to "0 to 16", it is still not working. Let me ask you. Is there a way to simply code what I want my text size to be, and not have to code a range? I saw there are other references to spnTextSize in the code, so I tried changing 14 to 24 just to see if an effect was seen, but no success.
 
Last edited:

klaus

Expert
Licensed User
... it is still not working.
What exactly is not working ?
Once you have selected a text size this is used in the main screen and remains as long as you don't select another one because it's saved in the init file.
I tested it before posting my previous post.
I increased the value For i = 0 To 4 to For i = 0 To 8 and it works as expected.
What exactly are you expecting.

Best regards.
 

nypaulie

Active Member
Licensed User
If after making the change (from 4 to 8) I select 22 as my text size I still get the same size text as the original one. I also tried changing 14 to 24, but any text size I try does not alter the size from the original one.
 

klaus

Expert
Licensed User
In the first post you find a new version with AutoScale for tablets.
I added a variable TextMinSize for the minimum selectable text size.
The value is different for phones and tablets.

Best regards.
 

nypaulie

Active Member
Licensed User
In the first post you find a new version with AutoScale for tablets.
I added a variable TextMinSize for the minimum selectable text size.
The value is different for phones and tablets.

Best regards.
Thanks Hans,
I will try that new version today. Will it be easy to find where I can enter my preferred text size (TextMinSize)?
 

selvamurali

Active Member
Licensed User
I am getting the following error

Hi


I am try to run the notepad example but i get the following error
 

Attachments

  • error.png
    error.png
    47.4 KB · Views: 264

jdevsoft

Member
Licensed User
Hi Klaus,

i would like to test this example Notepad but i got the following error:


Parsing code. Error
Error parsing program.
Error description: Unknown type: filedialog
Are you missing a library reference?
Occurred on line: 144
Dim dlgFile As FileDialog
The following objects added permissions (duplicates are ignored):

What i made wrong ?

I use B4A 2.70
 

Stulish

Active Member
Licensed User
Do you have the 'Dialogs' library selected like in the attached picture?
 

Attachments

  • LIB.jpg
    LIB.jpg
    28 KB · Views: 250

Beja

Expert
Licensed User
Hi Klaus, and thanks a lot for this great and most needed utility.

In the main module, the locale and dialog references are in red color, so I even didn't bother compiling it because I know what kind of notification will pop-up.
Tried to check lib but these 2 libraries are not in the lib list.
What should I do?
Thanks in advance.
 

klaus

Expert
Licensed User
You need following libraries:
AHLocale
Dialogs
IME
You must download the libraries, unzip them and copy the xml and jar files to the additional libraries folder.

Best regards.
 

Beja

Expert
Licensed User
Klaus,
ALL THUMPS UP! just wonderful.

Thanks for sharing with us.. the translation of UI is very simple and straight forward.
 

alfcen

Well-Known Member
Licensed User
Japanese

Here is the Japanese version.

Under (load/btnDelete_Click)

B4X:
answ = Msgbox2(Main.Texts(13) & CRLF & Main.PadFileName & Main.Texts(14), Main.Texts(0), Main.Texts(3), "", Main.Texts(4), Null)

should be modified as

B4X:
answ = Msgbox2(Main.Texts(13) & CRLF & Main.PadFileName & Main.Texts(14), Main.Texts(2), Main.Texts(3), "", Main.Texts(4), Null)

Main.Texts(0) = Main.Texts(2) 'word "Attention"
 

Attachments

  • notepad_ja.txt
    458 bytes · Views: 229

Beja

Expert
Licensed User
Attached is my Arabic translation of the text file.
notepad_ar.txt -hope it is useful for some.

Sorry I forgot to attach the file and when tried to edit the post I didn't see the attach icon!

ملف جديــد
هل فعلاً تريـد قفل البرنامج؟
إنتبــه
نعـم
لا
الملف موجود. هل تريد محوه واستبدالـه؟
ملف
حُفـظ
أختـر ملف
لم تختـر ملف
أحفظ الملف
هل فعلاً تريـد فتح ملف جديـد؟
تحميل ملف
هل فعلا تريـد محـو الملف

إعدادات
أطلب تأكيـد قبل المغادرة
حمل اخـر ملف استعملتـه
حجـم الخط
 

Attachments

  • notepad_ar.txt
    509 bytes · Views: 193
Last edited:

klaus

Expert
Licensed User
Hi Beja,
Thanks for the arabic translation.
When you edit a post and want to add any file click on the Go Advanced button then you get the whole editing window and click on Manage Attachments.
Could you please add the notepad_ar.txt file to your post.

Best regards.
 
Last edited:
Top