ImageView 9补丁绘图与填充线不受尊重

Jer*_*rds 7 android nine-patch android-layout

我有这个XML布局.frame_top_widget_holo是一个9-patch drawable,底部和右侧有填充线.它还在顶部和左侧有拉伸边界线.它被设置为背景,有一个图像可绘制集作为源.结果显示两者,但src图像与drawable设置的填充重叠.问题是scaleType,所以我怀疑这可能是一个错误.有谁知道如何解决这个问题?

<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
    android:scaleType="centerCrop"
    android:background="@drawable/frame_top_widget_holo"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/bigpicture" />
Run Code Online (Sandbox Code Playgroud)

Jer*_*rds 13

android:cropToPadding ="true"解决了这个问题.叹..