1
我遇到了9patch映像的问题。布局设置为50dp并带有9patch背景,但在小屏幕上加载时,布局大于50dp。9补丁缩小问题
但是我有另一个具有相同的9patch背景(menuBtn)的布局,并没有扩大,所以我不知道是什么使9patch在这一个布局上行事不端。
SS:
<?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>
9patch IMG: