I'm trying to make a menu like shown below. I have some items that extends CustomItem and consists of an Image and some Text. 开发者_运维技巧Now I want to position them as shown, but run into problems doing so - it seems only some minimal layout directives can be used in a Form. Is there a way for custom positioning using the Form class or is there another class I could use?
Make a HorizontalLayout CustomItem that aligns everything that is added to it horizontally.
Details:
Such class should have some kind of array to store all the items, and when there is a request to draw it, it should ask the width of each element inside it, do some calculations and call the items' draw method. Of course, such stuff is rather difficult. You would also have to implement the selection of these items with left/right keys...
It may be slightly better to use Canvas.
精彩评论