i need your improvement suggestions

grobi71

Member
Licensed User
Longtime User
Hallo all, :sign0148:

since a few days i have B4A and tried to write my first program. Here is the result. I think it's far away from perfect, so i need your improvement suggestions to learn to make it better .

Hallo zusammen,

seit kurzen habe ich ein Smartphone und habe überlegt mir meine Programme selber zu schreiben, da viele Programme einfach zu viele Rechte auf dem Phone besitzen . Hier ist mein erster Versuch. Wenn jemand mal Zeit hat, schaut euch den Code mal an. Dieser ist natürlich nicht perfekt.Ganz im Gegenteil aber vielleicht könnt Ihr mir ein paar Verbesserungsvorschläge machen.

LG & best regards
Grobi
 

Attachments

  • Convert.zip
    30.1 KB · Views: 269
Last edited:

Tom Law

Active Member
Licensed User
Longtime User
Library missing

Hi Grobie,

(Another newbie here). I downloaded your program but received an error:

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

Perhaps the library needs to be included with your project (or perhaps I have done something wrong).

Tom




Hallo all, :sign0148:

since a few days i have B4A and tried to write my first program. Here is the result. I think it's far away from perfect, so i need your improvement suggestions to learn to make it better .

Hallo zusammen,

seit kurzen habe ich ein Smartphone und habe überlegt mir meine Programme selber zu schreiben, da viele Programme einfach zu viele Rechte auf dem Phone besitzen . Hier ist mein erster Versuch. Wenn jemand mal Zeit hat, schaut euch den Code mal an. Dieser ist natürlich nicht perfekt.Ganz im Gegenteil aber vielleicht könnt Ihr mir ein paar Verbesserungsvorschläge machen.

LG & best regards
Grobi
 
Upvote 0

grobi71

Member
Licensed User
Longtime User
AH Locale library needed

Hallo Tom,

You need the AHLocale library and put it in your local library folder.
you can get the library by seach in this forum. else i will look if i'm allowed to
put it in the zip file.

regards
Grobi
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Hi Grobi,
Congratulations for your first program. Quite nice :) !

I like the direct conversion just after entering each character !

Some comments:
- I would hide the none relevant buttons depending on the input type. I prefer avoiding the user making 'errors' rather than displaying an error message.
- You have Panel2 just for the background color, this can directly be set to the Activity.
- Panel3 is never used.
- In some areas the code can be simplified.
- A 'Clear' button could be useful, even though, clicking on the given entry field has the same effect.
- You set the Activity title with the program name and version, but the title bar is not active.
- There is no layout for the standard screen size.

I took the liberty to make some minor modifications in your program.
I added also french texts.

You should not add libraries in the zip file !

@Tom,
You find the libraries in the List of avaliable Libraries.

Best regards.

EDIT: 2011.11.22 Removed sorce file, no more needed.
 
Last edited:
Upvote 0

rbsoft

Active Member
Licensed User
Longtime User
Very nice and useful!

Rolf
 
Upvote 0

grobi71

Member
Licensed User
Longtime User
improvement suggestions

Hallo Klaus,

thanks for your quick replay.

- In some areas the code can be simplified.
Yes, that is what i have to know at first. But what should i change ?


I would hide the none relevant buttons depending on the input type.
That's an good Idee i hope i can do it.

Panel3 is never used.
It's used on Layout 600x 1024 and 1024 x 600 as a shadow.

A 'Clear' button could be useful, even though, clicking on the given entry field has the same effect.
to Clear the input just click on any entry field

There is no layout for the standard screen size.
please what is the standard screen size ?


Klaus, thanks for your improvement suggestions i will try to implement this in the program and other programs

@rbsoft Thanks a lot That makes me happy. You just made my Day

Grobi
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Yes, that is what i have to know at first. But what should i change ?
Compare the attached program in my previous post with yours.

to Clear the input just click on any entry field
Yes, I noticed it.

please what is the standard screen size ?
The 'standard' size is 320 / 480 density 160. I think that the are less and less devices with this size and resolution. I tried your program on a Nexus One and in the Emulator (standard size). It's OK on the Nexus but in the Emulator the Exit button is almost not visible.

Best regards.
 
Upvote 0

grobi71

Member
Licensed User
Longtime User
zip file

Hallo Klaus,:sign0013:

are you sure you attached the right zip file ? i don't see anything changed

Grobi
 
Upvote 0

grobi71

Member
Licensed User
Longtime User
Hallo Klaus,

got it. :)
I'm just thinking about your sugestion to hide the keys but therefore i have to check which layout is used (Size x and y ) because i want to group the rest of the keys.
Your improvements are now implemented. I saw i didn't spend enought time for the select statements.:BangHead:

Grobi
 
Upvote 0

Tom Law

Active Member
Licensed User
Longtime User
Hi Grobi,

Just to let you know I managed to get it working (and even learned a bit about libraries ;-).


Regards

Tom



Hallo Klaus,

got it. :)
I'm just thinking about your sugestion to hide the keys but therefore i have to check which layout is used (Size x and y ) because i want to group the rest of the keys.
Your improvements are now implemented. I saw i didn't spend enought time for the select statements.:BangHead:

Grobi
 
Upvote 0

grobi71

Member
Licensed User
Longtime User
new improvments

Hallo all,

today i got really good sugestions and i tried to implement them.
Many thanks to Klaus who helped me a lot.

i added layout for 320 x 480 and 480 x 320

i tried to remove all unneeded keys dependent on the number system.

made some changes to the source to made it simpler

Klaus added french text

you can get the Source in Post #1

@Tom Law Good to hear that you could manage it. I'm also learning every day

rgds
Grobi
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Hi Grobi,

Well done :).

I would suggest you to move the new program in your first post. So there is only one place for the program.
Otherwise a user would need to go through the whole thread to search if there is a new version somewhere.

Best regards.
 
Upvote 0

grobi71

Member
Licensed User
Longtime User
Hallo,:)

my work is done so far. You can download the source in Post #1
It's free for all.

@Klaus I think you should now also remove your Version so that only one Version is in this thread. Should i appand the Source to the
"Basic4android Share Your Creations" Section? also this Thread can now be closed. Next i will try to write my own library.

Grobi
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I think you should now also remove your Version so that only one Version is in this thread.
You are right, done.

Should i appand the Source to the "Basic4android Share Your Creations" Section?
Yes, for shure !

Best regards.
 
Upvote 0
Top