.slx file editing

Added by monkadelicd over 1 year ago

I am wondering if themes can be edited outside of the phone using a text editor on the .slx file. I get annoyed when trying to resize and move blocks when they get very small.

Can the locations of blocks be edited with the <blocklocation> tag in the .slx file? If so what do the attribute keys r1,r2,c1,c2 represent and are the values in pixels?

Thanks


Replies

RE: .slx file editing - Added by kebab over 1 year ago

Yep, you can edit them. From my own playing around, i've found that each screen is divided into a number of rows and columns. Those coords represent the row and coloumn that the block starts and ends in. You can also modify the number of rows/columns in each screen, meaning you can create different sized blocks.

RE: .slx file editing - Added by monkadelicd over 1 year ago

What about screens. The layout seems like it may be defined in the .slx file. I see attributes that appear to be defining the which screens lie in each direction. Can the number of screens be modified or direction's changed without disrupting normal operation? I don't want to try this if I don't have to, in case it does do irreversible damage.

RE: .slx file editing - Added by Lemon over 1 year ago

I haven't dabbled into this but from what I understand it is possible.

As long as you keep backups of your themes (.slx files) I'm pretty sure you won't be able to do any damage that an uninstall/reinstall won't fix. :P

Let us know of your adventures!

RE: .slx file editing - Added by sweeterhome over 1 year ago

Quick note -- though the slx format is designed to allow changing the number of screens and how they are linked, it probably won't work quite yet in the beta. We designed the slx files this way so that when the ability to control screens, directions, etc comes, the existing slx files will still work.

Experimenting with modifying the file directly shouldn't be particularly risky, as Lemon says you can uninstall/reinstall of something goes wrong.

RE: .slx file editing - Added by cyberphreax over 1 year ago

This is much easier to test working in the emulator. It's pretty trivial to get SweeterHome running, you just have to use Google API's instead of Android for your AVD. Then, you can play around all you want and don't have to worry about anything. If it's of interest to anyone I'll throw up a quick post on how to set it up.

RE: .slx file editing - Added by monkadelicd over 1 year ago

What I'm wondering is how to get files on and off of an AVD sd card. I didn't look around too much but it wasn't obvious. Would something like ES File Explorer work over WiFi?

I guess Text Editor would work for editing it within the AVD itself.

I'll post back when I get a chance to try it out.

RE: .slx file editing - Added by cyberphreax over 1 year ago

There are a few ways to copy files to the sdcard image of an AVD. I usually just use adb.

Here are the commands I use to launch emulator, install SH and copy my .slx file over

emulator @Droid -partition-size 256 -scale .8
at this point that cmd window is tied to the emulator, so open a new one and cd to your sdk/tools directory or wherever if you added it to your path
copy the sh apk file and your .slx file to the sdk/tools directory
adb install sweeterhome2_beta_eclair-782.apk
adb push filename.slx /sdcard/sweeterhome

I'm writing a .cmd script to do it all including installing all of my .apk files but that's the gist of it. I'm still tweaking it but I can post it when I'm done.

I use ES with SMB shares to copy files over wifi to my physical device.

If you're using Eclipse, you can use DDMS and copy files to the SDCard using the file explorer too.

HTH

cp

RE: .slx file editing - Added by monkadelicd over 1 year ago

Thanks cyberphreax. I'm not sure if you'd need a script file for installing apps. The user data image and sd card image are saved. The next time you run the AVD all apps should persist so apps only need to be installed once.

A script for pushing the .slx file and any dependent files might be useful though. One that uses variables to accept image files to push as well. If I can find the time I'll see what I can do and share

RE: .slx file editing - Added by cyberphreax over 1 year ago

I have about 200 apps installed on my phone, so yes, I'd say automation is necessary for the first install <g>. Once I pull all of the apk files from data/app and data/app-private into a directory it's just a simple for command from the cmd line to install them.

for %a in (apks\*.apk) do (adb install %a 2>apkinsterr.log)

Here is my LaunchEmulator script.
I created a 2,4 and 8 gig sd card image with mksdcard. It defaults to the 2 gig image unless you specify 4 or 8 as an input parameter to LaunchEmulator.cmd

:: LaunchEmulator.cmd
@echo off
set img=%~1Gig
if not exist img.img set img=2Gig
start "" /MIN emulator @Droid -partition-size 256 -scale .8 -sdcard img.img
Echo Please wait for Emulator to finish loading.
pause
adb push Latest.slx /sdcard/sweeterhome
:: add any additional files here
cmd /k

RE: .slx file editing - Added by cyberphreax over 1 year ago

Guess I need to use a pre tag so the board doesn't strip my %'s

@echo off
set img=%~1Gig
if not exist %img%.img set img=2Gig
start "" /MIN emulator @Droid -partition-size 256 -scale .8 -sdcard %img%.img
Echo Please wait for Emulator to finish loading. 
pause
adb push MattLaytest.slx /sdcard/sweeterhome
cmd /k