Locus Map - forum

Support => Information => Topic started by: menion on May 11, 2011, 12:32:04

Title: [MANUAL] - creating custom screen
Post by: menion on May 11, 2011, 12:32:04
SAMPLE PACK FROM LOCUS VERSION 1.8.2 - download here (http://http://locus.asamm.cz/?download=Sample%20skins%2001)

So, simple and short description.

Recommended way ho to create this. This is very short explanation, sorry for that. Better will come later. Also this is mainly for people familiar with Android developing. If you're not, better is to use already created skins and look at them. To edit, use just simple NotePad! Much easier!!

1. download and install whole eclipse and Android SDK tools from here http://developer.android.com/sdk/index.html (http://developer.android.com/sdk/index.html)
2. after all works, create new android project. This will create base data structure. You'll not need anything program
3. project contains res/layout/main.xml file, that's our target. Learn with Eclipse GUI builder and edit this file
4. put resources (best to use 9-patch images) into res folders (supported, drawable, drawable-hdpi, drawable-mdpi, drawable-ldpi)
5. after compilation, take mail.xml file and image resources from compiled source (this is because of 9-patch images. If you want to use basic png files, you can add them directly into result. 9-patch have to be precompiled!).

You do not have to do previous steps. You can edit xml file directly in any editor. Previous steps are just recommended way for easy "Drag and drop" creating and also only way to support 9-patch images

And how to get actually all this works?
Locus/data/customScreen/   (root directory)

create ZIP file that containt this structure

MY ZIP

Place your main layout file into layout directory (or two files, one to layout-land, second to layout-port) and rename it to main.xml. That is important, because main.xml file is gate to whole layout, it have to be included!

also in root of you ZIP file, you can place these files (optional)

Finally, place this zip file, into root directory described above!

Active Views, you can use (warning, only limited functionality on almost all items - still in develop) and Actions you can apply are described in topics below
Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 17, 2011, 10:00:58
SUPPORTED VIEWS

Containers

Views

Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 17, 2011, 10:01:43
SUPPORTED ACTIONS - locus:actionClick

      "{track_record_start}"
      "{track_record_stop}"
      "{track_record_pause}"
      "{map_zoom_in}"
      "{map_zoom_out}"
      "{map_center}"

SUPPORTED ACTIONS - locus:actionVisibility

      "{lat_gps}", // GPS latitude (map center latitude if GPS off)
      "{lon_gps}", // GPS longitude (map center longitude if GPS off)
      "{altitude}", // GPS altitude (0 if GPS off)
      "{accuracy}", // GPS accuracy (0 if GPS off)
      "{gps_sats_used}", // actual used satellites for GPS fix
      "{gps_sats_all}", // all visible satellites
      "{declination}", // actual declination
      "{orient_course}", // course orientation (source depend on selection on GPS screen - GPS or internal compass)
      "{orient_course_opposit}", // course orientation (source depend on selection on GPS screen - GPS or internal compass)
      "{orient_pitch}", // pitch orientation
      "{orient_roll}", // roll orientation
      "{orient_gps_shift}", // orientation computed as bearing from previous to current GPS location
      "{orient_gps_angle}", // angle computed as {orient_gps_shift} - {orient_course}, so it's true moving direction.
      "{time}", // actual time
      "{speed}", // GPS speed (0 if GPS off)
      "{rec_dist}", // track recording - recorded sitance
      "{rec_dist_down}", // track recording - downhill distance
      "{rec_dist_up}", // track recording - uphill distance
      "{rec_alt_min}", // track recording - minimum altitude
      "{rec_alt_max}", // track recording - maximum altitude
      "{rec_alt_down}", // track recording - downhill altitude
      "{rec_alt_up}", // track recording - uphill altitude
      "{rec_alt_cumu}", // track recording - cumulated altitude
      "{rec_time}", // track recording - total record time
      "{rec_time_move}", // track recording - time only when move
      "{rec_speed_avg}", // track recording - speed average
      "{rec_speed_avg_move}", // track recording - speed average only when move
      "{rec_speed_max}", // track recording - speed maximum
      "{rec_points}", // track recording - num of recorded points
      "{rec_pace}", // track recording - num of recorded points
      "{map_center_lat}", // map center latitude
      "{map_center_lon}", // map center longitude
      "{map_rotate}", // map rotate value
      "{guide_wpt_name}", // guide target waypoint name
      "{guide_wpt_lat}", // guide target waypoint latitude
      "{guide_wpt_lon}", // guide target waypoint longitude
      "{guide_wpt_alt}", // guide target waypoint altitude
      "{guide_wpt_dist}", // guide target distance to waypoint
      "{guide_wpt_dist_to_finish}", // guide target distance to last waypoint of track
      "{guide_wpt_azim}", // guide target azimuth to waypoint
      "{guide_wpt_angle}", // guide target angle value (computed as {guide_wpt_azim} - {orient_course})
      "{guide_wpt_time}", // guide target time to waypoint
      "{guide_wpt_time_to_finish}" // guide target time to last waypoint of track
Title: Re: [MANUAL] - creating custom screen
Post by: Rob on May 20, 2011, 09:23:48
Help pls: with first simple skin, it worked. Now when clicking customer screen button, I always get errormessage:Cannot get main.xml layout file.
I copied the zip files into .. customerscreen without de-zipp. What am I doing wrong ?
Rob
Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 20, 2011, 09:34:57
ah sorry, that was a little old config files. I added link to download actual pack from 1.8.2 locus version (check first post). These are skins that are as default in application on market ...

PS: I know in skins is missing some better example of RotateView (like speedview) ... I'll add it later ...
Title: Re: [MANUAL] - creating custom screen
Post by: Rob on May 20, 2011, 09:48:28
Thx, I got it. Deleted all and copied just actual ones -works !
Title: Re: [MANUAL] - creating custom screen
Post by: jorgesomers on May 20, 2011, 21:45:52
Very nice manual it worked.
your custom screens have little problem of graphics size and text size it doesnt look like pictures posted here..

BR
Jorge Somers
Sao Paulo - Brazil
Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 22, 2011, 13:58:50
Thanks .. they need some more improvements. These are just an examples ...
Title: Re: [MANUAL] - creating custom screen
Post by: Paradroid09 on May 22, 2011, 19:41:12
Hi,

thanks for this very nice Program, thanks for this nice new feature ;-)

I try to make my own today, but cant get it work like I want it to. There were always errors in textsize. The texts are rendered to small.
Then I try to repack your sample "Simple map.zip" and earned the same error. (see attachment)
The file was created with 7-zip.

What do I wrong?
Would you like to test the file on your machine?

Many thanks
Paradroid09
Title: Re: [MANUAL] - creating custom screen
Post by: daubor on May 23, 2011, 15:08:11
I think, the creation of own screens will be possible in future releases. Those sample's are just for an impression!

I tried it myself to create some custom screens, but nothing worked! Seems to be releated with zipping.
Because unpacking one of the samples and repacking it without any changes will corrupt it!
Locus is unable to find main.xml.

Anyway, when this is implemented, i will go for pro!
Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 23, 2011, 15:11:04
this is really weird because I do nothing special with data, just basic zipping! All samples should work fine in last market release!
Title: Re: [MANUAL] - creating custom screen
Post by: daubor on May 23, 2011, 15:33:31
Moah....i'm an idiot!

When unzipping via contextmenu in windows -> "Extract to folder <archiveName>" all contents of archive will be put in this folder!
After that i modified main.xml!
When finished, i selected this folder and created an archive of it! But the resulting structure is changed:
-> <archiveName>.zip/<archiveName>/layout/main.xml
must Be:  <archiveName>.zip/layout/main.xml

Usererror...
Title: Re: [MANUAL] - creating custom screen
Post by: jorgesomers on May 23, 2011, 21:52:05
You are zipping with full path...
Try this..
Open to folder simple Map
Select sub-folders assets,layout and the folders info.html and icon.png..
Right-click use option Zip (Im using zipgenius)
It will create a zip with 2 sub-folder and 2 files WITHOUT FULL PATH... !

Thats the problem!
btw YOU ARE NOT AN I... !!!
Title: Re: [MANUAL] - creating custom screen
Post by: jorgesomers on May 23, 2011, 21:56:55
hi,

I need some EXTRA instructions..
HOW TO ALIGN RIGHT all numbers in red .. ?

Attached I'm donating to the comunity my bike layout called Somers Sml (no so small)

If someone can make both numbers in red align to the right side I'll be very glad !

BR
Jorge Somers
Sao Paulo - Brazil !
Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 24, 2011, 05:59:38
Hi Jorge,
  nice attempt!

anyway for all:
- sample FONT used in samples isn't ideal. It was only a sample. I'm sure, you'll find much better ... try to look for example here http://www.1001freefonts.com/ (http://www.1001freefonts.com/)
- your skin is probably tested on your phone but on my HDPI resolution it looks bad ... look at screenshot. So Maybe you can descrease a little size of fonts, or I should create some mechanism for settings more then one size of text depend on resolution
- to align text in layout you can use "gravity" attribute on TextView object
Title: Re: [MANUAL] - creating custom screen
Post by: jorgesomers on May 24, 2011, 15:46:41
Hi Boss, kkkkk

Ok, I didnt know about those fonts..

In fact I'm starting with Android since last month when I got my new telephone form my local mobil operator.
I'm a software developer since my first apple II+ and never stoped to update my own firmware and I'd like to learn everything about developing systems for mobile devices. (send me in PM some links or tricks where i can find a good tutorial for starting with android development, something like Visual Web Developer where I can do everything and it autocompletes, with help etc.. and obviusly a database to work with! )

As you can see attached my screen pictures (btw how do you make printScreen with your cellphone ?) I took with my camera, everything looks good..

Below the section where I placed the tm moving..
I used the gravity RIGHT at textview in both cases and it didnt work.

Thanks in advanced
JOrge Somers - Sao Paulo - Brazil
skype - jorgesomers

<!-- tempo em movimento -->
   <LinearLayout
      android:layout_width="160dp"
      android:layout_height="120dp"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:padding="0dip"
      android:orientation="vertical">
      <TextView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:textColor="#aaff0000"
         android:text="Tm Move"
         android:textSize="28dip"
         android:gravity="right"
         locus:textFormat="{u}"
      locus:textFont="crysta.ttf" />
      <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:orientation="horizontal" >
         <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColor="#aaff0000"
            android:text="{rec_time_move}"
            android:textSize="50dip"
            android:gravity="right"
            locus:textFormat="{i.d}"
         locus:textFont="crysta.ttf"   />
      </LinearLayout>
   </LinearLayout>
Title: Re: [MANUAL] - creating custom screen
Post by: MaleSmurf on May 24, 2011, 16:00:31
I use SCREEN CAPTURE SHORTCUT... works WITHOUT rooted phone...
Title: Re: [MANUAL] - creating custom screen
Post by: menion on May 24, 2011, 16:02:58
Hi,
  to start with developing on android is best to check official site (http://http://developer.android.com/index.html). There is all you need ... (for creating screenshots is a lot of manuals on internet or if you start with developing on Eclipse IDE, you'll be able to do them in Eclipse directly).

about gravity="right" ... remove last LinearLayout that containt only one TextView. This will help. There is not need why to put one TextView into container like LinearLayout
Title: Re: [MANUAL] - creating custom screen
Post by: stebu on June 03, 2011, 16:06:08
I created my "own" layout to show gps-info and distance to target. In addition there's a familiar looking compass and an arrow pointing towards the target. I hope that MaleSmurf will not mind! And thanks a lot for the good example!

I have a question, are the drawable-hdpi and -ldpi necessary? I guess they are there fore different screen resolution?
I did not understand the use of some (most) parameters, so once I got something half-way decent, I kept it.

Then an observation: If I freeze the display into "horisontal" rotation in Locus, it works. But if I activate a skin, then the locking disappears!
And I still think, that the setting does not stick over power cycle. I have to go and re-select the horisontal lock after power up.

Here's my layout, REMOVED, see a better example from http://http://forum.asamm.cz/viewtopic.php?f=10&t=735&p=4072#p4072
Title: Re: [MANUAL] - creating custom screen
Post by: David on July 17, 2011, 09:16:05
Hi,

The way custom screen is been implemented is indeed very flexible. A disadvantage is that it is not possible to have a simple dashboard overlapped with the map where the displayed fields can be changed on-the-fly.

It would be great to have even 2,3 or four customizable fields on the fly, similar to what a Garmin GPS provides or like the Android application GPS Essentials (screenshot at https://ssl.gstatic.com/android/market/ ... ss-480-1-7 (https://ssl.gstatic.com/android/market/com.mictale.gpsessentials/ss-480-1-7)).

In this way, it would be possible to quickly change the statistics shown depending on the current need (show altitude if I am going uphill, etc). What do you think?
Title: Re: [MANUAL] - creating custom screen
Post by: rtspring on July 20, 2011, 10:40:56
Dear Menion,

I like your product a lot, and i am playing with screen customization for a while with great succes. I have a few questions:

A) Unfortunately i am in a despirate need for a new {action}. (or perhaps it's already there but i couldn't find it) You provide the {orient_course} variable, which can be used to rotate the compass scale accordingly. What i would like to have is the possibility to move the compass needle...
In other words: If my course orientation is NE, the rotateview rotates the image 45 degrees counter clockwise, such that NE points up.
What I would lik instead is that my rotateview holds an image of the compass needle, and rotates this 45 degrees in clockwise (opposit) direction.

Any help on this matter is appriciated very much.

B) Besides, but less urgent, it would be great to have another {action} variable that holds the angle between last gps position and the previous gps position, which is not neccesarely the same. (although my boat is heading towards one direction, it will drift due to the wind. as a result, the actual course might be very different from my heading)

C) Is it possible to calculate with multiple {action} variables? Example:
Code: [Select]
locus:action="{guide_wpt_angle} - {map_rotate}"
D) Finally i'd love to know if it is possible for me to define buttons in my custom screen that hold actions like "zoom" or "select map" or "start recording track"?

Thank you so much for your time,

Rudolf
Title: Re: [MANUAL] - creating custom screen
Post by: menion on July 20, 2011, 10:46:35
Hi,
  I'm glad that someone is playing with this feature. Unfortunately non of your answers have now positive response. But if I see that someone like you is interested in this, I'll try to do something with this. Cannot currently say time, because I'm mainly fighting with vector maps etc. but I'll look at it ;)
Title: Re: [MANUAL] - creating custom screen
Post by: rtspring on July 20, 2011, 12:39:20
Just an idea of what i am working on  :D

(http://http://i637.photobucket.com/albums/uu98/rtspring/snap20110720_115934.png)
Title: Re: [MANUAL] - creating custom screen
Post by: menion on July 20, 2011, 12:43:12
hey, what the ... :D ... perfect!!

EDIT: So, I at least added:

"{orient_course_opposit}", // course orientation (source depend on selection on GPS screen - GPS or internal compass)
"{orient_gps_shift}", // orientation computed as bearing from previous to current GPS location
Title: Re: [MANUAL] - creating custom screen
Post by: rtspring on July 20, 2011, 17:05:00
YES YES :) Thanks! (Can't wait for the update...)
Title: Re: [MANUAL] - creating custom screen
Post by: rtspring on July 21, 2011, 14:59:08
Aaaarghhh...

Allmost done, but in need for one more parameter / {action}...
To complete my 'sailing skin', i need something you did with {guide_wpt_angle}, calculated from {orient_course} and {guide_wpt_azim}...
Which is {orient_gps_shift} - {orient_course}, call it something like {orient_gps_angle}
It gives me the real direction in which we are moving...

Thanks
Title: Re: [MANUAL] - creating custom screen
Post by: menion on July 21, 2011, 16:02:33
thanks for PM, I'm sure you know how to do it (Relative layout is your friend)

anyway I don't fully understand to you new {orient_gps_angle}

correct direction you're going is {orient_gps_shift}, this is correct value ... ah when I write it, I get it :) This is correct value only when you have your phone (tablet) looking forward .. got it

EDIT: added, I just hope it will have good orientation, you have to check (I'm too lazy on it :) )
Title: Re: [MANUAL] - creating custom screen
Post by: rtspring on July 22, 2011, 10:20:06
Hi, thanks again, once more...  :D

I will check, soon i will be able to show you a first version of my 'sailing' skin :)
(first for tablet, later for smaller screen as well)
Title: Re: [MANUAL] - creating custom screen
Post by: rtspring on July 23, 2011, 14:35:14
1.9.4 i love it YES YES, Thanks!!!

EDIT: One final remark  :oops: i see that the filtering for {orient_gps_shift} has been implemented. But now when i am not moving, it defaults back to value 0. So each time i am standing still, gps heading jumps pointing north. I would like it to keep the last value instead. As such my orientation is kept in the same direction when i am standing still, and continues to update when i am moving again...  :roll:

Further: GREAT :D , i have tested all {orient_gps_shift}, {orient_gps_angle}, {orient_course_opposit}, and they all point in the right direction!!!

Great work!
Title: Re: [MANUAL] - creating custom screen
Post by: stebu on August 20, 2011, 00:18:12
Quote from: "menion"
SUPPORTED ACTIONS
...
Hi Menion!

Would it be possible to add a list of closest POIs within the alert range? Or at least the closest one, please.
Like:
"{POIalert_name}"
"{POIalert_distance}"
"{POIalert_bearing}"

The list option could have 5 closest POIs ("{POIalert_name_1}" etc)

This would be useful at least for Geocahing, when serching for closeby caches. Unless you decide to implement this as a part of POI alert, which would be even greater!
Title: Re: [MANUAL] - creating custom screen
Post by: gynta on November 25, 2011, 23:17:42
posting moved to viewtopic.php?f=41&p=11129#p11129 (http://forum.asamm.cz/viewtopic.php?f=41&p=11129#p11129)
Title: Re: [MANUAL] - creating custom screen
Post by: riju on December 27, 2011, 11:18:06
Hi Menion,

thanks for providing this great application! (I used to be an Ozi fan now switching to Locus .. )

I'm currently working to create a custom screen to be used for flying - (see picture)
As I want to use the screen on various devices (Galaxy, eeePad) I started to use the units (dp) for widget sizes and (sp) for textSize and I have realized that (sp) does not seem to be recognized (no change in textSize) - see the attached zip file - ... is there anything I'm doing wrong?
In addition I took an attempt to use resources to easily change colors, sizes, and language ... does this work? if so how?
Do you plan to offer more actions like: start recording, stop recording, center GPS position on map?
Is there a way to change the way the time is displayed e.g. without showing the units like 12:05:45 ?
Proposal create something similar to the formatting provided for altitude, speed .. - proposal {h}{m}{s}

I know it's a lot of stuff but you can tell I really like to use it :-)

[attachment=0:2xi0u0ge]screenshot (Custom).jpg[/attachment:2xi0u0ge]
Title: Re: [MANUAL] - creating custom screen
Post by: menion on December 27, 2011, 11:27:59
very very nice ...

I really plan to expand "Custom screen" a lot ... this is just a "Beta" version to discover if there will be interest for such feature. I see a huge potential in this, so I'll for sure work on this at start of next year!

(also, do you use OpenAir data?)
Title: Re: [MANUAL] - creating custom screen
Post by: riju on December 27, 2011, 14:48:47
thanks for your reply.
I'm looking forward to any updates!

The map shown on the screen is a "scanned and calibrated" version of an ICAO map - I have used Oziexplorer to calibrated it and mapc2mapc to convert it to SQlite -
In parallel I'm working to create a OSM based vector map for flying, which merges OSM data and AirPath Data for airspace info (I have already written a converter to translate AirPath into OSM format using some custom tags.)

I will post a sample in seperate OSM threat as soon as it is available
Title: Re: [MANUAL] - creating custom screen
Post by: bebe814 on January 08, 2012, 20:38:30
Hi riju,
I'm interested if you succeed in vector map for flying. I was trying to create one with GPSBabel but finaly I found out there will be so many information with lot of overlayed airspaces (TMA, TSA, CTR ...) and locus have no ability to filter(turn on/off) layers and also navigation to point stored in .map is not possible (as far as I know) .So I end up with POI for airports and OpenAir files for airspaces (loaded/filtered through map item manager).  Also missing (or not found so far - i'm relatively new user) functionality to search for points in POI (or in .map when offline) I can only select them from map

@menion: would be possible in map item manager to let user to select more files and then confirm (at the moment after selection dialog closes immediately - it's not so comfort when you have 15 openair files)
Title: Re: [MANUAL] - creating custom screen
Post by: riju on January 19, 2012, 09:53:31
Hi bebe,

still working on it - will create a different threat - somewhere in the OSM context. (Major challenge is that the required renderers do not support custom tags that are required for Airpath data) (will keep you posted)

Hi Menion,
any progress on addition capabilities for custom screens? I would love to continue working on it.
What I would be looking for is to include buttons to control Locus in my screen as well as some Odo Meters

Hope to hear from you soon
Title: Re: [MANUAL] - creating custom screen
Post by: cahillcahill on February 01, 2012, 06:36:37
There is a little problem of graphics size and text size. Anyways good!
Title: Re: [MANUAL] - creating custom screen
Post by: menion on March 07, 2012, 20:49:59
hello Guys,
  I was waiting some time with updates of Custom screens. Main reason was, that there was no possibility to simply publish such screens to people. Anyway now exist Locus Shop and even if there is not yet some simple possibility to publish some your works by your own, I can do it for you.

So, if you have some nice screen, you would like to publish to people, I can do it for you by Locus shop. There is many possibilities like links to some screenshot, web page and for some interesting - possibility to sell some created screen (also or icons, etc ...) over Locus Shop. In this case, contact me by PM. I just warn, that I still don't have perfect system on such tasks so it may take some time till I react anyway adding Custom screen skins for free, is task for few minutes ...
Title: Re: [MANUAL] - creating custom screen
Post by: riju on March 14, 2012, 13:30:52
Hello menion,

thank you for the update -
Before publishing my screens I would like to add some of the features I have mentioned in earlier posts.
By when do you expect these types of features to be available - (e.g. additional actions that can be used on custom screens)
Title: Re: [MANUAL] - creating custom screen
Post by: menion on March 15, 2012, 08:01:49
hmm I have no specific plan for this (time plan I think). Tomorrow I would like to release new version so I think that during next week, I should start some works also on these custom screens ... I'll let you know in this topic when something change
Title: Re: [MANUAL] - creating custom screen
Post by: gynta on March 17, 2012, 20:46:50
i miss some custom screens in Locus Shop.
offtopic: i miss some other cursors (images) in Locus Shop.
Title: Re: [MANUAL] - creating custom screen
Post by: menion on March 23, 2012, 16:03:28
Quote from: riju
Hi Menion,

thanks for providing this great application! (I used to be an Ozi fan now switching to Locus .. )

I'm currently working to create a custom screen to be used for flying - (see picture)
As I want to use the screen on various devices (Galaxy, eeePad) I started to use the units (dp) for widget sizes and (sp) for textSize and I have realized that (sp) does not seem to be recognized (no change in textSize) - see the attached zip file - ... is there anything I'm doing wrong?
In addition I took an attempt to use resources to easily change colors, sizes, and language ... does this work? if so how?
Do you plan to offer more actions like: start recording, stop recording, center GPS position on map?
Is there a way to change the way the time is displayed e.g. without showing the units like 12:05:45 ?
Proposal create something similar to the formatting provided for altitude, speed .. - proposal {h}{m}{s}

I know it's a lot of stuff but you can tell I really like to use it :-)

Hi Riju, so:

1. "sp" now works correctly!
2. added support for style.xml and color.xml files ;) - uff
3. added support for actionClick - now you can attach to Button or newly to ImageButton (so here is possibility to use "src" tag) action. Available are start/stop/pause track record, zoom in/out and center tu current location
4. added possibility to display time without units
5. languages are little bit problematic so I created solution that I'll display list of supported strings that will be in application converted to correct text from translated strings
Title: Re: [MANUAL] - creating custom screen
Post by: myhi on March 29, 2012, 20:42:16
Hi Menion

I'm a big fan of your great app. I am planning to go on a desert trip with my 4x4 buddies and your app will hopefully guide us through the Sahara desert in Northern Africa... ;-)
Right now I'm working on some custom screens which should be useful for offroad navigation by car (guiding along a track).
Maybe I will post them here, once they are ready to be used by other people.

But ATM I am having some troubles with the newest version of Locus (v2.2.0):
Whenever I open my custom screens for the second time (I think they then load from "/cache" directory) I get the following error: "Problem with skin - wrongly extracted".
I'm not shure if thats my fault, or maybe there is a little bug (or even a new feature) in this version of Locus. ;-)

Also the release notices say the following: "6.add: many improvements in Custom screens system" and I am curious, if there is some new custom screen functionality in this new version... :-) could not find any documentation for now. =)

Greetings from Switzerland
Myhi
Title: Re: [MANUAL] - creating custom screen
Post by: menion on March 29, 2012, 20:58:32
Hi,
  I'll wrote more tomorrow ... hope :) But you can download My Tracks skin from Locus Shop. You'll there see changes. Mainly support for color and style files and support for some components like tables, imageViews etc ... :)

  and about error. Sorry for that but I still have no idea how to fix it. Problem is causing extracting from zip to cache/customScreen directory ... so to correct work in you case usually help restart or deleting cache/customScreen (or something like this) ... I'll look at it ...
Title: Re: [MANUAL] - creating custom screen
Post by: riju on March 31, 2012, 19:16:11
Hi menion
Thank you so much for adding the additional capabilities.
Where can I find the related manual e.g. how to use the new features or time or actions and formats?
Regards
Richard
Title: Re: [MANUAL] - creating custom screen
Post by: gynta on April 01, 2012, 21:35:52
idea/whish:
plz add a preview to custom maps in the shop.
similar to "Map cursors (blue & orange)"

plz add a preview to custom themes in the shop.
similar to "Map cursors (blue & orange)"
Title: Re: [MANUAL] - creating custom screen
Post by: menion on April 01, 2012, 21:39:43
Hi Gynta,
  I'll finally do it tomorrow. Overview (good idea), your skin (as you remind me in PM), improved description if first post and all other stuff around Custom screens...
Title: Re: [MANUAL] - creating custom screen
Post by: menion on April 02, 2012, 16:20:22
description in first post is little bit - more actual. Anyway I'm sure, that current description is too complicated for easy skin creating. On second side, I can't expect that people that have problems with handling of Locus itself will create any themes.

Anyway, Gynta, will you have some time on improving your skin? Because Locus Custom screen now allow to use buttons (as are in My Tracks skin) so I want to ask if you'll want to add zoom button to your skin. I think they're more then needed :)

Attached is simple skin I use for testing that already contain zoom buttons. Not nice, but working

And last thing, please create separate topic (something like mine) to Custom screen section viewforum.php?f=41 (http://forum.asamm.cz/viewforum.php?f=41) and I'll then put your skin in Shop together with link to this new topic. Thanks ;)

And Riju: best is to check this small skin and also My Tracks skin downloadable from Locus Shop. Most of features is there
Title: Re: [MANUAL] - creating custom screen
Post by: gynta on April 02, 2012, 19:13:55
Quote from: "menion"
if you'll want to add zoom button to your skin.
nop thx - no buttons - maybe on next skin. :)
Title: Re: [MANUAL] - creating custom screen
Post by: menion on April 02, 2012, 21:13:30
OK understand :). Skin published in Shop. Seems that issue with extracting skin is more often then I expect (at least for me every second attempt to display skin fail), have to fix it tomorrow
Title: Re: [MANUAL] - creating custom screen
Post by: carlm on April 06, 2012, 00:32:16
Locus Free 2.2.0

I downloaded gynta's minimal.zip custom screen from here:

http://http://forum.asamm.cz/viewtopic.php?f=41&t=1763

I put the .zip in /mnt/sdcard/Locus/data/customScreen/ per the instructions in the first post in this thread.
I tested the .zip file after copying it there.

I already had the default custom skins installed.
When I select Menu->Functions->Custom screen, Minimal has not been added to the menu.  The menu still contains just the five default custom skins.

I next deleted /mnt/sdcard/Locus
I next visited the Locus Shop and downloaded Minimal.
Minimal now appears in Menu->Functions->Custom screen and works when I select it.
However, I don't know where it got installed -- there still is no /mnt/sdcard/Locus directory.
Furthermore, it doesn't look the same as in the screenshot in gynta's forum post.  In the forum post screenshot there is no custom screen toolbar.  I'm getting a custom screen toolbar with title "Minimal by Gynta".

This gives rise to the following questions:

1. How and where does one install his own custom screen .zip?  The instructions in the first post didn't work for me.

2. Why does the version of Minimal from the Locus Shop have a custom screen toolbar when the version from gynta's forum post (above) apparently does not?

Thanks!
Title: Re: [MANUAL] - creating custom screen
Post by: tommi on April 06, 2012, 06:09:47
Seems you got two Locus folders on your phone. Check both internal and external sd card for a Locus folder.
1) Install your own custom screen to the same folder as the ones from Locus shop (which of the two folders it will ever be)
2) You can toggle the bar on the top by pressing the slim yellow button in the upper right corner of the map.

Hth,
Thomas
Title: Re: [MANUAL] - creating custom screen
Post by: carlm on April 06, 2012, 13:38:12
Thomas,

Thanks!
Found Locus directory on internal SD: /mnt/emmc/
And yes, slim yellow button toggles custom screen toolbar.
Title: Re: [MANUAL] - creating custom screen
Post by: carlm on April 06, 2012, 20:00:42
Can't get "{map_center}" button action to work

Locus Free 2.2.0
Nook Color
No GPS -- using coarse location

The map center button on standard bottom panel DOES work, but I can't get the map center button on my custom screen to work: nothing happens when I tap the button.  As a test I tried "{map_zoom_out}" and that worked OK.  Here's my button code:

Code: [Select]
<Button
android:layout_width="15dip"
android:layout_height="52dip"
android:gravity="left"
android:background="@drawable/ico_button"
locus:actionClick="{map_center}" />

UPDATE 04/10/12

I got my GPS today.  Map center button on custom screen not working w/ GPS either.

UPDATE 04/15/12

Problem fixed in Locus Free 2.2.2
Title: Re: [MANUAL] - creating custom screen
Post by: carlm on April 16, 2012, 02:08:29
Change button/container background based on button state?

On a custom screen, is it possible to change the background of a button or its container based upon the state of the button (like the Locus standard UI does)?  I tried following some examples I found on the web, using XML selectors, but no matter what I tried I got no background at all.

If this is possible a pointer to some working code would be appreciated.
Title: Re: [MANUAL] - creating custom screen
Post by: menion on April 16, 2012, 09:03:47
hello. On all buttons and ImageButtons should be applied automatically backround drawable same as I use for other buttons in Locus. So if you want to have same background, do not overwrite it. Just use android:src tag for settings images on ImageView and not background. Check "Simple map" skin, where this works

About XML selectors. They aren't supported in Custom Screen. I'm not sure if they'll be big benefit anyway I know they'll be a lot of work :)
Title: Re: [MANUAL] - creating custom screen
Post by: carlm on April 16, 2012, 19:54:48
Menion,

Thanks!  I got what I was after by switching from Button to ImageButton per your suggestion.
Title: Re: [MANUAL] - creating custom screen
Post by: riju on May 31, 2012, 19:18:00
Hi Menion,
finally found the time to test the new features:
- sp working very well
- actionClick also working nicely

Formatting the display of time is only working for "time" but not for any other time output like {rec_time_move} or {guide_wpt_time}
Some more questions
- can actionVisibility be used to toggle between two screens - like turning one set of fields on and another one off?
  I'm thinking of having one screen just showing data and another one showing the map with some minimal data
- is the android:visibility parameter implemented?
Title: need help with sliding compass
Post by: balloni55 on August 23, 2012, 15:29:15
Hi,
after first stepps for creating my own CS i need help.
The compass is displayed, but it dosnt slide, where is the fault?
i´m looking forward for solution, thanks
Title: Re: need help with sliding compass
Post by: menion on August 23, 2012, 19:59:04
Hi,
  I'm very sorry, I completely forget to check your PM ...

after some short fight, I discovered that problem was in your definition but also in locus (because there were no support for full width slide and also another minor issue). So problem in Locus is now fixed. You may test it in next release (tomorrow). I also added some more info about problem you had together with correct values and short explanation here http://docs.locusmap.eu/doku.php/manual ... en?&#views (http://docs.locusmap.eu/doku.php/manual:creating_custom_screen?&#views) . It's not so simple because it's created generally not only for compass values, but also for other values.
Title: Re: need help with sliding compass
Post by: balloni55 on August 24, 2012, 19:34:07
Hi menion,
thanks for your work!
I have installed the new version and changed my code, but i get a messages, see Screenshot
[attachment=0:1mpl0rw2]Screenshot.jpg[/attachment:1mpl0rw2]



my code:
Code: [Select]
<!-- Kompass -->
<LinearLayout
android:id="@+id/linear_layout_01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:orientation="horizontal">

<SlideView
android:layout_width="match_parent"
android:layout_height="30dip"
locus:action="{orient_course}"
android:background="@drawable/img_compass_slide_background"
locus:slideImage="@drawable/img_compass_slide_b"
locus:slideStartPosition:="1dip"
locus:slideStartValue="180"
locus:slideEndPosition:="match_parent"
locus:slideEndValue="-180"
locus:slideInfinite="[true]" />
</LinearLayout>

Edit 2 times
Title: Re: need help with sliding compass
Post by: menion on August 24, 2012, 20:44:56
remove ":" in lines

 locus:slideStartPosition:="1dip"
 locus:slideEndPosition:="match_parent"
Title: Re: need help with sliding compass
Post by: balloni55 on August 24, 2012, 21:36:16
many thanks menion,
i am blind !!! :oops:
now it works, great job!
Title: Re: [MANUAL] - creating custom screen
Post by: golgot on August 30, 2012, 13:16:32
Hi All,
Is there any way to make custom screen full screnn (removing the upper line)?
I hope I can share my own custom screen in a near future.
Title: Re: [MANUAL] - creating custom screen
Post by: tommi on August 30, 2012, 14:55:01
Quote from: "golgot"
Is there any way to make custom screen full screnn (removing the upper line)?
AFAIK it can only be disabled interactively by the user, see e.g. the yellow bar on the upper right corner in "Minimal by Gynta".
Title: Re: [MANUAL] - creating custom screen
Post by: golgot on August 30, 2012, 15:14:19
Thanks, works perfectly
Title: Re: [MANUAL] - creating custom screen
Post by: golgot on August 30, 2012, 16:28:35
Is it possible to combine actionvisibility to various elements (simultaneously)
for example, I'd like to (un)mask both top panel and another button at the same time?

I've tried to put both :
locus:actionVisibility="@+id/zoomout"
locus:actionVisibility="@+id/locus_top_panel" />

but it doesn't work
Title: Re: [MANUAL] - creating custom screen
Post by: golgot on August 30, 2012, 18:55:13
Menion,
I'm trying to make a custom screen for cycling...

Up to now, I'm able to provide a map screen including various infomations that I find useful for cycling, but this is not enough for me, and I'd like to add some interactivity to these screens. :)

For example, I'd like to change the screen appearance if the speed exceed a pre-defined limit (there is no use to display 10px characters a 50 km/h) :

In my dreams, i'd like to be able to :
 - change screen according to various parameters (speed>40) or conditions (e.g speed>currentmaxspeed)
 - turn LCD on and off.
 - play sounds
 - have some user parameters for my custom scren (threshold aso.)
 - display graphs (altitude, speed)
 - open various locus managers (data manager, map manager, GPS manager aso.)

I'm quite sure it's impossible to do such things with an xml file, so it will be necessary to redefine how custom screens are to be made...
But it can be really nice if we are able to provide a real customization to locus, so this generic application may fit for very specific needs.
Title: Re: [MANUAL] - creating custom screen
Post by: menion on August 31, 2012, 11:07:11
Hi Golgot,
  firstly, it's possible to set only one item to react on visibility change

  second part is worst :). s you wrote, it's quite hard to do this with just xml file that define GUI. I was already thinking more then year before about some kind of scripting language that will be supported for custom screens, but wasn't really time for this. On custom screens is generally so many work to make them works perfectly. So I have to say sorry, no, for now. I really would like to create from this complex possibility for various interactive useful screens, but my priorities are clear and this unfortunately is not on top of them.
Title: Re: [MANUAL] - creating custom screen
Post by: golgot on August 31, 2012, 11:53:56
Some time ago, I asked for some function (onboard map calibration), your reply was :
"But not all wishes may come true, and this is one that will not."
Now, there is a very useful function in Locus called "onboard map calibration".
So I'm quite confident if you say "but my priorities are clear and this unfortunately is not on top of them"
:)
Title: Re: [MANUAL] - creating custom screen
Post by: menion on August 31, 2012, 12:06:25
:) yes this is how my developing continue ... when I started work on Locus for a full time, around almost two years ago, some users wanted to create track recording in Locus. And I wrote, no, why, exists many other apps on this. And you see ...

because I'm not huge firm with precise work-list, but I do what I decide to do (at morning), everything is possible :) (btw. on-board calibrator have problems with huge images, also this is planned to improve)