我遇到了 9patch 图像的问题。布局设置为 50dp,背景为 9patch,但在小屏幕上加载时布局大于 50dp。
但是,我有另一个具有相同 9patch 背景(menuBtn)的布局,并且没有扩展,所以我不确定是什么导致 9patch 在这个布局上行为不端。
不锈钢:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="50dp"
    android:padding="0dp"
    android:background="@drawable/actionbar">
    <RelativeLayout
        android:id="@+id/menuBtn"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="@drawable/actionbar"
        android:clickable="true">
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:src="@drawable/actionbar_menu"/>
    </RelativeLayout>
    <ImageView
        android:id="@+id/div1"
        android:layout_width="1px"
        android:layout_height="50dp"
        android:layout_toRightOf="@id/menuBtn"
        android:src="@drawable/actionbar_divider"/>
</RelativeLayout>
9补丁图片:
