-
Notifications
You must be signed in to change notification settings - Fork 39
Home
This functionality allows the download and installation of custom layouts from the application. Currently, this layouts are stored in this osmtracker-android-layouts repository (which is taken as the default repository), however, any other repository that satisfies the following structure will work for such purpose.
If you want to learn how to create a custom layout, you can visit the OSMTracker wiki page, particularly, the Custom buttons layouts section.
Custom Layouts created by users will be uploaded to this repository or another Github repository that follow the instructions below.
Note: In the next representation we add some example Layouts (name
and name_2
) for a better explanation.
layouts/...
name/...
es.xml
en.xml
name_icons/... <-- it contains all the images of the Layout
icon_1.png
icon_2.png
icon_3.png
readme.md <-- Explanation of icons, purpose, etc.
name_2/...
fr.xml
ge.xml
name_2_icons/...
icon_1.png
icon_2.png
icon_3.png
readme.md
metadata/...
name.xml
name_2.xml
README.md <-- This readme file is for the general repository
The layouts
folder is the root directory where all other elements are stored (Layouts files, images, metadata files, etc).
-
name/name_2
folders: these folders represent each Layout, the name of the folder is determinated by the name that each user places on their Layout. It contains the Layout file (es.xml and en.xml, in this case), the icon folder (icons) and areadme.md
file. -
es.xml/en.xml/fr.xml/ge.xml
files: these files are the Layout in their different languages, its name comes from the ISO 639-1 code of the language in which the Layout is: Spanish (es), English (en), French (fr), among others. -
icons
folder: how its name says it, contains the icons/images of the Layout (regardless of the different languages). We recommend 500x500 or 300x300 pixels for its size.You can use the original 500x500 or 300x300 icons, or you can create new images. -
readme.md
file: This file contains a description of the files (for the repository purpose only) where the purpose of the Layouts is briefly explained and each of its buttons (its icons and their meaning). You can see an examplehere
(insert link when already exist an example). -
metadadata
folder: its contains metadata files (information) of each Layout -
name.xml/name_2.xml
file: Its is a file of information of each Layout (languages, description. place where is stored), clarify that it is only ametadata
file for each Layout (regardless of the number of languages).
It contains the following data:
<metadata>
<option iso="es" name="Español"> descripción de los objetos que se pueden mapear </option>
<option iso="en" name="English"> description of the objects you can map with it </option>
<github username="myUser" repo="myRepo" branch="myBranch" />
</metadata>
-
username
says the GitHub username of the owner of the repository. -
repo
says the repository's name where the layouts are. -
branch
says in which branch the layouts are.
Finally, the README.md
file describes the repository and its purpose, besides, contains an index that points to each readme.md
of each Layouts within the repository.