I'm trying to find out if there is a way to get more primitive elements (buttons) on a page. Because there are just two controls (buttons and textblocks) to work with (no listboxes etc.) and my app works with multiple items to select, I'm somehow stuck in what I wanted to do. In the end the user should have the option to select from a list of different items.
So far I added buttons for each item which works but it is limited. After adding about 15 buttons there are just 14 buttons and one of them is without a content. I started to add one ScrollFlowPanel to the PageLayout (orientation horizontal) for my categories. Then added three more ScrollFlowPanel to the first ScrollFlowPanel (orientation vertical) for my items. Each of the child ScrollFlowPanel can have one textblock (category name) and multiple buttons. Adding two buttons to each category wasn't a problem. But with more buttons problems showed up.
My second try was just using one category with more buttons. But after 12 buttons the same problems came back. I know there is a control limitation for each tile. Alternatively I could add a second tile (if possible on Band). But I don't really like that idea.
Any other suggestions?
(Really can't believe that the Band is so limited)
As per the Band SDK overview doc:
Note: The total number of elements (primitive and container) that a layout may contain is limited to about 20. The exact number will vary depending on the type of elements in the layout.
If you're topping-out at 15 buttons per page, I guess that a Button
is more resource-heavy than TextBlock
, requiring more drawing, event handling, etc.
Rather than adding a ton of buttons to a page, have you considered doing what the Band's settings page does?
Take a look at the "Brightness" setting Button
which, when hit, takes you to a page with a list of TextBlock
elements. When the user scrolls through and then selects a TextBlock
(e.g. 'Auto'), they're returned to the previous page and the text of the settings' Button
is changed to reflect their choice.
Perhaps a hierarchical organization of pages is the way to go, allowing you to reduce the maximum number of controls per page to no more than 12-15 or so?
Note: As per Sparkfun's Band teardown, the Band's CPU is a Freescale Kinetis K24 32-bit ARM Cortex-M4 a very low-end processor in Freescale's Kinesis range. The K24 only has 256KB RAM on-board (+2MB external RAM) and a 120MHz processor core which has to manage, syncronize and coordinate 15+ sensors, USB, Bluetooth, screen, touch sensor, buttons, etc. and lasts ~18 hours on a single charge.