I'm creating an app which will show 3 rows of data in the first view. Each row of data will include some text and a simple chart. Kind of like how you see the Weather and Sunrise/Sunset data in the Glances dashboard.
I'd like each row to have a hit region so if the row is touched then a new view is pushed. I was thinking of using buttons via layout.xml, but when doing that, any of the row data is hidden. I'm guessing that the layout.xml is covering the entire view?
Here is my layout.xml
<layout id="RowLayout">
<button x="40" y="80" width="200" height="50" background="Graphics.COLOR_BLACK" behavior="onMenu">
<state id="stateDefault" color="Graphics.COLOR_BLUE" />
<state id="stateHighlighted" color="Graphics.COLOR_YELLOW" />
<state id="stateSelected" color="Graphics.COLOR_BLUE" />
<state id="stateDisabled" color="Graphics.COLOR_RED" />
</button>
</layout>
Here is my view:
public function onLayout(dc as Dc) as Void {
setLayout($.Rez.Layouts.CityLayout(dc));
}
public function onUpdate(dc as Dc) {
dc.clear();
dc.setColor(Graphics.COLOR_WHITE,Graphics.COLOR_BLACK);
dc.drawText(80, 80, Graphics.FONT_MEDIUM, "ROW TEXT", Graphics.TEXT_JUSTIFY_CENTER);
}
Is there a way to get this working?