图像按钮缩放和 9Patch
我有一个彼此相邻的相对布局和图像按钮。 这一切都非常适合 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现 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.