开发者

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

开发者 https://www.devze.com 2023-03-03 22:23 出处:网络
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 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

精彩评论

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