开发者

How can I add a Button to a custom scrolling and zooming SurfaceView?

I wanted to add a custom ImageButton on top of my SurfaceView so it e开发者_开发技巧ssentially scrolls with the View. The canvas scrolls and zooms with a matrix. How could I go about doing this? Thanks.


Assuming I understand the question correctly, can you not just do button.draw(canvas) in your SurfaceView.onDraw() method? You definitely want to bypass the normal layout engine (because it's terribly slow for moving things around) so you'll also have to fake up hit-detection etc.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜