缩放按钮而不丢失 3D 效果
有没有一种方法可以缩放按钮,使其不会失去 3D 效果。由于所有内容都按比例缩放,因此当按钮比例发生变化时,按钮的 3D 边框会变得太大。
在 iPhone 上,可以设置一个属性,这样就不会发生这种情况,并且按钮在任何尺寸下看起来都很好。
Android 上有类似的东西吗?
或者如何设置一个按钮,以便缩放始终看起来不错?
非常感谢!
Is there a way to scale buttons in such a way that the do not loose their 3D effect. Since everything is beeing scaled proportionally the 3D border of a button becomes too large when the button scale changes.
On iPhone there is an attribute that can be set so that this does not happen and the button looks good in whatever size.
Is there anything like this on Android?
Or how would one setup a button so that scaling looks good all the time?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 9-patch 按钮背景href="http://developer.android.com/guide/developing/tools/draw9patch.html" rel="nofollow">draw-9 patch 在 Android SDK bin 文件夹中。这些将从非常小的样本/绘图中很好地扩展。
You could make 9-patch button backgrounds using draw-9 patch in the Android SDK bin folder. These will scale very nicely from a very small sample/drawable.