android框架图像定位

发布于 2024-12-28 00:03:38 字数 140 浏览 2 评论 0原文

在我的应用程序中,我想要一个框架(中间有一个孔),然后将其放在我用相机捕获的或从图像库中获取的图像上。

我想将框架显示在顶部,并让用户能够用手移动图片,将其放置在框架内的正确位置,然后将两个图像合并到用户所看到的位置。

有什么建议吗?

in my application I want to have a frame (with a hole in the middle) and then put it over an image I have captured with the camera or taken from the image library.

I want to show the frame on top, and have the user be able to move with his hand the picture to position it at the right place within the frame and then merge the two images to what the users sees .

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可可 2025-01-04 00:03:38

您可以简单地使用框架布局来做到这一点http://developer.android.com/reference /android/widget/FrameLayout.html
在此布局中,您将 ImageView/SurfaceView 或其他内容放在顶部(作为最后一帧)
你把面具放进去。

要移动蒙版,您需要实现手势或手动操作并覆盖
onTouch/onTouchIntercept 函数来实现您的移动功能。

you can simply do that with a framelayouthttp://developer.android.com/reference/android/widget/FrameLayout.html
In this layout you put your ImageView/SurfaceView or what ever, on top (as last frame)
you put the mask in it.

To move the mask, you need to implement a Gesture or do it by hand and overwrite
the functions onTouch/onTouchIntercept to implement your move functions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文