图像按钮缩放和 9Patch

发布于 2024-12-03 19:56:12 字数 127 浏览 1 评论 0原文

我有一个彼此相邻的相对布局和图像按钮。 这一切都非常适合 1280x800 的平板电脑屏幕。 它不适合 1024x600 屏幕。 所以,我认为 9Patch 可能是解决方案,但它似乎不起作用。 有什么问题以及如何让布局/按钮自动放大和缩小?

I have a relative layout and image buttons that abut each other.
It all fits nicely on a 1280x800 tablet screen.
On a 1024x600 screen it does not fit.
So, I thought that 9Patch might be the solution, but it does not seem to work.
What's wrong and how do I get the layout/buttons to scale up and down automatically?

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

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

发布评论

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

评论(1

酒解孤独 2024-12-10 19:56:12

我发现 9Patches 非常适合扩大规模,而不是缩小规模。也许使用较小的图像,它会放大。

还要确保你的 9.png 是有效的,如果你是在油漆/Photoshop/其他东西中做的,请确保这些角是清晰的。

What I find with 9Patches, is that they are great for scaling up, rather than down. Maybe use a smaller image and it'll scale up.

Also make sure your 9.png is valid, make sure those corners are clear if you did it in paint/photoshop/something.

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