My first try was to do all layouting (positioning/size of the arrows, font sizes etc) programatically which worked fine but wasn't that readable afterwards. The type of code with position-calculations you find very intuitive while writing it but don't understand it after a hour or two :)
So I tried to do things with different layouts. But I don't think Layouts are made for the different datafield sizes of the Edge series?!
- There seems to be no way to automatically detect the size of the datafield and choose the right layout? For example I want to display the arrows on top or below the speed for big datafields and on the right for small datafields.
- Also aligning the indicator arrows to the right seems to be impossible? You have to position it with a absolute X position, or am I missing something. I found no way to provide a percent value or (like in css) something like providing positioning relative to the right or bottom.
- There seems to be no way to position shapes you defined in a drawable? For example I want to define the position of my arrows dynamically but drawable.setLocation() or drawable.locX=123; won't work.
So I ended up in a terrible mixture of defining some things in a layout and doing some things in the code. In my opinion this will increase complexity and coupling :(
So my main question is: Am I using the layouting via xml completely wrong? I've about 8 years of experience in web development (HTML, CSS, Javascript, Java) but Monkey C and the layouting concept seems to be quite different.
I was very frustrated when I started the simulator with the Edge 520 instead of the 1000 => Everything was overlapping and misaligned. This was much better wich my "code only" approach.