Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for creating custom layouts needs updating #211

Closed
jsavage opened this issue Jun 8, 2019 · 8 comments
Closed

Documentation for creating custom layouts needs updating #211

jsavage opened this issue Jun 8, 2019 · 8 comments
Assignees

Comments

@jsavage
Copy link

jsavage commented Jun 8, 2019

There was some work done to improve the process of installation Custom Buttons some while ago. However the documentation on the wiki has not been been updated since 2015 so it is not clear exactly how this feature can be used.

To assist with updating the wiki, the following notes are a summary of what I have found out about this feature and an issue that I am troubleshooting. I will add some screenshots and write this up properly once I have managed to use it successfully.

What have I discovered so far?

  1. Under settings, towards the bottom of the list of settings there is a selection 'Buttons presents'
  2. The 'Button Presents' screen enables the user to select between a default layout and one from a list of any others that are already on the phone.
  3. The 'Button Presents' screen also has a '+' option which take you to an 'Available Layouts' screen that lists button layouts that are available to be downloaded. By default this screen lists layouts that are in the master branch of labexp's github repository called 'osmtracker-android-layouts'.
  4. The github repository accessed can be changed using the Spanner icon on the 'Available Layouts' screen.

With this knowledge:

  • I forked the repository osmtracker-android-layouts
  • I created my own layout using existing ones as a template
  • I changed the github setting on my app
  • When I selected save the app responded with a message 'github repository valid'

My issue is that my layout is not yet listed on the 'Available layouts' screen after I have completed the above. All other layouts from the forked repository are however shown.
I have tried deleting a couple of the forked layouts. However, when I select the '+' and I am briefly seeing 'Available layouts' but then getting Error: "Unable to connect to the default custom layouts repository". At this point I am stuck and unable to revert to a default app configuration.

The README.md in the root folder lists my layout as per the others
My layout contains:
openseamap_icons a folder containing icons
en.xml
README.md

for the record en.xml contains:

<?xml version="1.0" encoding="utf-8"?>
<layouts>
    <layout name="root">
		<row>
			<button type="textnote"/>
		</row>
		<row>
			<button type="voicerec" icon="voice_32x32" />
			<button type="picture" icon="camera_32x32" />
			<button type="textnote" icon="text_32x32" />
		</row>
        <row>
            	<button type="tag" label="Beacon Red" icon="openseamap_icons/Beacon_Red.png" />
		<button type="tag" label="Can Red" icon="openseamap_icons/Can_Red.png" />
		<button type="tag" label="Cone Green" icon="openseamap_icons/Cone_Green.png" />
		<button type="tag" label="Beacon Green" icon="openseamap_icons/Beacon_Green.png" />
        </row>
            	<button type="tag" label="North Cardinal" icon="openseamap_icons/Pillar_Black_Yellow.png" />
		<button type="tag" label="East Cardinal" icon="openseamap_icons/Pillar_Black_Yellow_Black.png" />
		<button type="tag" label="South Cardinal" icon="openseamap_icons/Pillar_Yellow_Black.png" />
		<button type="tag" label="West Cardinal" icon="openseamap_icons/Pillar_Yellow_Black_Yellow.png" />		
        <row> 
            	<button type="tag" label="North Cardinal Top" icon="openseamap_icons/CardNButton.png" />
		<button type="tag" label="East Cardinal Top" icon="openseamap_icons/CardEButton.png" />
		<button type="tag" label="South Cardinal Top" icon="openseamap_icons/CardSButton.png" />
		<button type="tag" label="West Cardinal Top" icon="openseamap_icons/CardWButton.png" />
        </row>
        <row>
            	<button type="tag" label="Isolated Danger Mark" icon="openseamap_icons/IsolButton.png" />
		<button type="tag" label="Safe Water Mark" icon="openseamap_icons/CardEButton.png" />
		<button type="tag" label="South Cardinal" icon="openseamap_icons/CardSButton.png" />
		<button type="tag" label="West Cardinal" icon="openseamap_icons/CardWButton.png" />
        </row>
    </layout>
</layouts>
@adam3497 adam3497 self-assigned this Jun 11, 2019
@adam3497
Copy link
Contributor

Hi @jsavage

Thank you for the reminder. In the next days we'll try to update the information about the new functionality in the Wiki.

About your problem, first I think that it was our mistake to finish the Available Layout activity when there is an error with the repository connection, because when that happens the user is left without an option to go back to the default parameters. And second, you may have forgotten to add your Layout information in the metadata file?

@jsavage
Copy link
Author

jsavage commented Jun 14, 2019 via email

@adam3497
Copy link
Contributor

adam3497 commented Jun 14, 2019

Do you mean that the OSMTracker launch the Available Layout activity with the custom repository after reinstalling? Can you tell me what is the version that are you using?

@jsavage
Copy link
Author

jsavage commented Jun 14, 2019 via email

@adam3497
Copy link
Contributor

James, I was trying to copy your problem in order to obtain the same issue but when I reinstalled the app (with the version in the play store and from the master of this repo) all goes back to default. May be it can be some configuration in your device?

Also you can try to go to settings -> Apps -> Scroll (or search) until see OSMTracker for Android -> Storage (in my device) -> Clear data

This will remove all the configurations and the data in the database, perhaps this can help to solve the problem.

@jsavage
Copy link
Author

jsavage commented Jun 17, 2019 via email

@adam3497
Copy link
Contributor

James, you're welcome. :)

And I think that the problem is because there isn't a metadata directory under layouts root directory. The app needs that dir (with the files in there -> like this https://github.com/labexp/osmtracker-android-layouts/tree/master/layouts/metadata) to consult the current layouts in the repository.

@jsavage
Copy link
Author

jsavage commented Jun 21, 2019

Adam,
I can confirm that the metadata directory and file are essential.
I now have a basic layout working.
Many thanks

@jsavage jsavage closed this as completed Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants