开发者

How to produce these views? How Android screens go beyond the simple controls that have Android?

How Android screens go beyond the simple controls that have Android, look at this for example. How come so that each key responds independently? Is it a single image, several or a drawing?

How to produce these views? How Android screens go beyond the simple controls that have Android?

开发者_StackOverflow中文版

How to put each circle in the specific country? What if I want a country to be selected?

How to produce these views? How Android screens go beyond the simple controls that have Android?


You can make your own controls by subclassing a view and overriding it's methods. The onDraw method gives you a canvas where you can place just about anything. Check the official android API or this post to get your started.

For the first image, my guess is that it is one image and the position of each click is translated to the corresponding key on the piano. The second image might also be a single image with separate overlays for each country and circle to set the desired color and place the numbers (that's what I would probably do, but it can be done differently).

If you require more flexibility than fixed images, take a look at creating 2D graphics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜