New in version 1.9.0b:
- Changed <Buttons> tag to <Entities> for consistency
- Moved <Locale> tag from around Parameters to a Parameter attribute
- Add ability for serviceDomain / servicePort Parameters to support second value for public network
- Enable optional page scrolling
- Enable display animation for all non-Button entities
- Rewrite and enhance entity background options
- Speed up Change Location
- Many small performance enhancements and code cleanups
http://www.andreapp.com/downloads/Andre-1.9.0b.zip
Details:
WARNING: This release has several syntactical changes that WILL break your configs! Read on to see what needs to change.
Changed <Buttons> tag to <Entities> for consistency
As previously announced, I have changed the <Buttons> tag to <Entities> to more clearly indicate that more than <Button..> tags belong there. Simply search for the single <Buttons> and </Buttons> tags in each page and change them to <Entities> and </Entities> respectively.
Moved <Locale> tag from around Parameters to a Parameter attribute
Also as previously mentioned, there is no longer a <Locale id="xxx"> container around lists of Parameters. In all cases where these tags get defined (optionally for Page and ButtonGroup <Parameters> sets and inside <Button> tags) remove the <Locale id="xxx"> and </Locale> tags. Instead, you assign the Locale as an attribute on each Parameter. "default" locale is implied, you do not need to define the locale if the Parameter is intended for the "default".
Example:
OLD
Code:
<Page id="demopage">
<Parameters>
<Locale id="default">
<Parameter name="labelColor">ffffff</Parameter>
</Locale>
<Locale id="hometheater">
<Parameter name="labelColor">ffffff</Parameter>
</Locale>
</Parameters>
<Buttons>
<Button id="demobutton">
<Locale id="default">
<Parameter name="buttonLabel">My Label</Parameter>
<Parameter name="labelSize">35</Parameter>
</Locale>
<Locale id="hometheater">
<Parameter name="buttonLabel">My other Label</Parameter>
<Parameter name="labelSize">50</Parameter>
</Locale>
</Buttons>
</Page>
NEW
Code:
<Page id="demopage">
<Parameters>
<Parameter name="labelColor">ffffff</Parameter>
<Parameter locale="hometheater" name="labelColor">ffffff</Parameter>
</Parameters>
<Entities>
<Button id="demobutton">
<Parameter name="buttonLabel">My Label</Parameter>
<Parameter name="labelSize">35</Parameter>
<Parameter locale="hometheater" name="buttonLabel">My other Label</Parameter>
<Parameter locale="hometheater" name="labelSize">50</Parameter>
</Entities>
</Page>
Add ability for serviceDomain / servicePort Parameters to support second value for public net
The Settings->Server page has two domains and ports so Andre can toggle the IP and port used to fetch assets (config.xml, images,fonts, etc.) depending on if you're on your home network or something else (like the cell data network). To make this same capability work for web service calls, the Parameters 'serviceDomain' and 'servicePort' can take an optional second value, separated by a comma. The first value will be used if you're on your home network (e.g. connected to the WiFi access point defined in Settings->Server), the second if you're not.
Example:
Code:
<Parameter name="serviceDomain">192.168.0.1,www.mydomain.com</Parameter>
<Parameter name="servicePort">80,8080</Parameter>
Enable optional page scrolling
Traditionally, Andre Pages intentionally do not scroll; If the contents of the Page are too big, then Andre squeezes things to fit. I have several Android devices with smaller screens and I wanted to be able to make the Buttons larger but not split everything into a ton of Pages. I added scrolling so you can make a large Page and fling it up and down (or left/right) to quickly access more Buttons.
Simply add scrollDirection="value" to the <Page> tag, where value is either 'horizontal' or 'vertical'. Then just add more items to the Page than will fit, and the view will let you scroll by dragging the screen.
Example:
Code:
<Page id="home" scrollDirection="vertical">
Note: Enabling scrollDirection for a page will disable gestures for that page.
Enable display animation for all non-Button entities
Last release added the Text entity, and one of the attributes was 'animation' which allowed the display of the Text entity to be animated. I've enabled that attribute on all other Entities other than Button (Button already has animations) including ButtonGroup, Browser, WidgetContainer, and any others that come down the road. There are two attributes, 'animation' which specifies an animation ID that was defined earlier in the config, and 'replayAnimation' which is true or false, and determines if the animation plays every time the page is displayed, or just the first time after Andre is loaded.
Example:
Code:
<Browser id="testbrowser" url="www.google.com" animation="fadein" replayAnimation="true" />
Rewrite and enhance entity background options
ButtonGroups and Browsers had a very rudimentary ability to have a border drawn around them, by specifying a borderSize and borderColor attribute in the tag. I completely re-wrote this and enabled it for all entities other than Button. Here are the new options:
bgFillColor - Color in hex (AARRGGBB e.g. "ff8566aa") for background fill (default transparent)
borderColor - Color in hex (AARRGGBB e.g. "ff8566aa") for border (default transparent)
borderWidth - Decimal (e.g. 5.0 or 9.5) that specifies number of pixels wide for the border
borderOnTop - true or false (default true) to draw the border over or under the entity
borderCornerRadius - Decimal (e.g. 15.0 or 20.5) radius in degrees to round the corners by (default 0, or square corners)
This is a nice way to draw a containing line around groups of buttons (with ButtonGroup) or entity like Text or Browser.
Speed up Change Location
The Locale feature is intended to let the same page layouts be re-used for equipment in different rooms or locations, and is used by selecting 'Change Location' from the menu. It was kind of slow to switch however (especially for complex pages), so I optimized it considerably, provided that only some of your Buttons will actually have more than one Locale defined.
Many small performance enhancements and code cleanups
I've been finally going back and cleaning up a lot of half-baked code, which should improve both stability and performance. With this, there might be new bugs; please report any oddities you encounter.
Because of the amount of changes, please be sure to let me know if you have any problems with your config (other than those intentionally broken!).