Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我为 android EditText 背景创建了一个简单的 9 补丁。当我在 Eclipse 中预览图形布局时,它完全按预期工作。
问题是,当我在设备上安装应用程序时,所说的 EditText 缩放得非常可怕,几乎无法区分。
可能是什么问题呢?
我能想到的几件事:
您说它在 Eclipse 中运行良好,所以它可能不是 1 或 2。
它可能在 9-patch 区域(1 个像素边界)上有垃圾(像素不完全是黑色),因此它不将其理解为 9-patch。
使用该工具保存此图像draw9patch并在构建之前清理您的项目!
draw9patch