如何截取 lwuit 应用程序的屏幕截图,但不在模拟器中

发布于 2024-10-07 01:53:16 字数 123 浏览 0 评论 0原文

我有一个 LWUIT 应用程序,其中有一些组件无法在模拟器中正确显示。我需要为文档截取一些屏幕截图,并希望我可以通过调用 Image 方法或 Form 方法以代码(在手机上运行)来完成此操作。

到目前为止还没有运气。

I have an LWUIT app that has a few components that don't display correctly in the simulator. I need to take some screen captures for docs and was hoping I could do it in code (running on the handset) by either invoking an Image method or a Form method.

No luck so far.

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

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

发布评论

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

评论(2

与往事干杯 2024-10-14 01:53:16
  1. 简单的替代方案尝试另一个模拟器...或稍微更改您的代码,以便它在模拟器中看起来更好。

  2. 使用 http://deviceanywhere.com 或任何其他现实世界的设备模拟程序并使用标准手段。 ;)

  3. 有很多方法......但它们似乎都涉及黑客。

    您可以覆盖特定表单的绘制方法。创建一个图像,从所述图像获取图形对象,并将其传递到绘制方法中...将图像保存到手机 SD 卡或将其发布到服务器。

    如果您想查看屏幕上绘制的内容,您可能需要使用原始图形对象再次调用paint方法。

  1. Simple alternative try another emulator... or change your code slightly so it looks better in the emulators.

  2. Use something like http://deviceanywhere.com or any other real world device emulation programs and take a screen shot using standard means. ;)

  3. There are ways... they all seem to involve hacks though.

    You can override the paint method of your particular form.. Create an image get graphics object from said image pass that into paint method... save image to phones SD card or post it to a server.

    You might need to call the paint method another time using the original graphics object if you intend to see what is drawn on the screen.

萌辣 2024-10-14 01:53:16

不知道 LWUIT 中是否可以使用此功能,但请查看:链接文本< /a>

Dont know if this is available to you in LWUIT, but check out: link text

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