Hi
I need to know how to include some .XML files to my Android device or maybe it's possible to include the files in the main program?
I have two lines in my code that need to be include .XML files.
moai.CreateDialog(FileToString("Edit.xml"), "win")
moai.CreateApp(FileToString("ExpoEditeur.xml"))
I did try to insert the TEXT like this
moai.CreateDialog(<?xml version="1.0" encoding="iso-8859-1"?> <dialog id="dlg" title="Ajouter un Article" width="300"> <vgroup> <colgroup columns="2"> <label># Item</label> <textentry id="item"/> <label>Nom</label> <textentry id="Nom"/> <label>Prix</label> <textentry id="Prix"/> <label># Exposant</label> <textentry id="Exp"/> </colgroup> <hgroup> <button id="ok">OK</button> <button id="cancel">Cancel</button> </hgroup> </vgroup> </dialog>
, "win")
but Hollywood failed to compile.
Thank you.
How to include XML files on the Android device or into the APK compiler.
Re: How to include XML files on the Android device or into the APK compiler.
You have to do it this way:
Code: Select all
moai.CreateDialog([[<?xml version="1.0" encoding="iso-8859-1"?> <dialog id="dlg" title="Ajouter un Article" width="300"> <vgroup> <colgroup columns="2"> <label># Item</label> <textentry id="item"/> <label>Nom</label> <textentry id="Nom"/> <label>Prix</label> <textentry id="Prix"/> <label># Exposant</label> <textentry id="Exp"/> </colgroup> <hgroup> <button id="ok">OK</button> <button id="cancel">Cancel</button> </hgroup> </vgroup> </dialog>]], "win")
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How to include XML files on the Android device or into the APK compiler.
Alternatively, you can do this:
Using @FILE will automatically link the specified file to the applet/executable.
Code: Select all
@FILE 1, "gui.xml"
moai.CreateApp(ReadString(1))
Re: How to include XML files on the Android device or into the APK compiler.
Thank you very much, I'll try both solution.
Bye!
Pierre.
Bye!
Pierre.
Re: How to include XML files on the Android device or into the APK compiler.
Can I use this command to include RapaGUI plugin in my script?
Thank you.
Pierre
Thank you.
Pierre
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How to include XML files on the Android device or into the APK compiler.
You mean you want to link rapagui.hwp into your applet/executable? This isn't necessary on Android because Hollywood on Android has RapaGUI built in.
Re: How to include XML files on the Android device or into the APK compiler.
Yes that's what I want... I was thinking for the others platform (Windows, OS4 and Mac)
Thank you.
Pierre
Thank you.
Pierre
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact: