在android中缩放多个视图
我正在 Android 中创建一个棋盘游戏。在我的绝对布局中,我有一个板视图和一个平铺视图。这两个视图可以相互重叠,因为您是通过单击并拖动将图块放置到板上的。我没有为此使用位图绘图,因为我想为板和图块处理两个单独的 onTouchEvent。
问题:我希望我的板视图能够放大和平移。同时,我想知道平铺本身的规模。无论如何,有没有办法在安卓上做到这一点?我当前的解决方案是分别缩放两个视图(这需要大量工作),但我认为应该有比这更好的解决方案。或者我的方法完全不对?
任何想法或帮助将不胜感激。谢谢!
I'm creating a board game in android. In my absolute layout, I have a board view, and a tile view. Those two views can overlap each other, since you're placing a tile onto the board by click and drag. I am not using a bitmap drawing for this since I want to handle two separate onTouchEvent for the board and for the tile.
Problem: I want my board view to be able to zoom in and pan. At the same time, I want to tile to know to scale itself. Is there anyway to do this on android? My current solution is to scale the two view separately(which is a lot of work) but I think there should be a better solution than this out there. Or my approach on this is completely off?
Any ideas or help would be appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论