android - Nexus 5 的 9 补丁问题

标签 android nine-patch nexus-5

我有一个 9 补丁图像,在这里 9 patch image

现在,我将它用作这样的相对布局的背景图像

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/ae_bubble">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:text="How satisfied are you in terms of Aeroman performance regarding: TAT, quality of the work performed and aircraft appearance?"/>

</RelativeLayout>

这给了我使用 nexus 5 预览的 android studio 预览中的下一个结果,在中心完美

android studio preview

但是当我在 nexus 5 模拟器中运行它时,箭头的尖端没有居中,对于真正的 nexus 5 设备也是如此

enter image description here

我在另一个设备上试过这个,比如 moto g 模拟器和真正的 moto g 设备,尖端在中心是完美的,只影响 nexus 5 的图像气泡有什么问题?,也很奇怪android studio 上的 nexus 5 预览居中,我该怎么办?,感谢您的帮助

修复 这是有效的最终图像

enter image description here

最佳答案

刚刚检查了你的图像,你应该改变两个点的位置。现在它们与底线的最后一个像素处于同一位置。尝试将它们每边移动一个像素。

关于android - Nexus 5 的 9 补丁问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29932738/

相关文章:

android - Android 上使用 Wifi 的 HttpClient 导致延迟(根据初始请求)

Android:短信被 ChatON 应用程序阻止

java - 如何在 9patch 上正确应用 adjust_pan?

android - 9-patch 图像和库

android-5.0-lollipop - BackupManagerService恢复超时导致强制停止

安卓双卡模拟器

android - 无法将 aosp 5.0.1 刷入 NEXUS 4(LG 设备)

android - 完全透明的 Activity ,带有 9 个补丁角图像

android - 如何从设备定义中找到 Nexus 5 选项?

android - 联系 5 : cannot change LED colour through sysfs interface