New to B4A and stuck.

mramos

Member
Licensed User
Longtime User
I want to write a program to mark my location via GPS (Mark button) and retrieve it later with a lookup button. Lookup button will see if a a filename with the LON & LAT exists (based on where I am) and display information on the screen from that file. I can track fishing spots and things.

I am very new to B4A. I will attach what I have so far. If someone can tell me, do I need to multiple activities to do this? Or can I change the screen in one activity? Attached is the direction I was heading, want to make sure it is the right one.

Feel free to finish it.
 

Attachments

  • geoloc.zip
    6.8 KB · Views: 230

klaus

Expert
Licensed User
Longtime User
I would suggest you to use Panels instead of different Activities.
You can create a specific layout for each panel in the Designer and load them in the code.
The attached modifed version of your program shows the principle.

Best regards.
 

Attachments

  • GeoLoc_1.zip
    6.8 KB · Views: 273
Upvote 0

mramos

Member
Licensed User
Longtime User
Klaus,

Thanks for the quick response and info. Will read up on the panel. Hope I can do edit.text with them too.

Thanks
 
Last edited:
Upvote 0

mramos

Member
Licensed User
Longtime User
Stuck again. Here is the project. I think I am mixing command. I am hoping all over to try to figure them out.
 

Attachments

  • geoloc.zip
    8.1 KB · Views: 251
Upvote 0

klaus

Expert
Licensed User
Longtime User
Here you are:
- be careful, to NOT use same names for different Views, there is only one Activity so all names must be different.
- you set the Quit buttons on the panels out of the user's sight, if you hide them you won't be able to leave the Panels and go back to the main View !
- you used Activity.LoadLayout("geoloc") to leave a panel, you must use a button or another View to leave it, the activity layout is still valid.

Best regards.
 

Attachments

  • geoloc_1.zip
    8.1 KB · Views: 254
Upvote 0

mramos

Member
Licensed User
Longtime User
Klaus,

Thanks for all the help. I cleaned it up some like your mentioned. This program works on the emulator but not on the evo for some reason, the file system is not happy.

I am slowly figuring the format out. Like the panels..
 

Attachments

  • geoloc.zip
    8.3 KB · Views: 290
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…