gpt4 book ai didi

android - 9 补丁 Android 不显示边距

转载 作者:行者123 更新时间:2023-11-28 11:35:50 24 4
gpt4 key购买 nike

我正在尝试制作一个用于 Android 应用程序的 9-Patch 图像。

这是 9-Patch 工具的屏幕截图和我的图片: enter image description here

我在布局中添加这张图片:

<Button android:id="@+id/tiny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:text="Text"
android:textSize="8sp"
android:background="@drawable/arrow_active" />

(图片位于“drawable”文件夹中,图片名称为“arrow_active.9.png”)

这是来自 eclipse 的屏幕截图:

enter image description here

在真实设备上我也看不到图像的箭头。

我尝试使用 ImageView 和 Button,布局是 TableRow。

我还尝试使用较小的图像: enter image description here

在真实设备上,我看到 9Path 工具添加了黑色像素。

最佳答案

Try this tool ...它在图形上很好,并自动为所有桶生成图像。您可以从中设置拉伸(stretch)区域和内容填充。

关于android - 9 补丁 Android 不显示边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20933399/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com