3
9.PNG 이미지를 RelativeLayout
의 배경으로 설정하면 내부의 모든 요소가 가운데로 수축됩니다. 다음은 XML과 스냅 샷입니다. 나는 색상이나 일반 이미지로 배경을 변경하는 경우 RelativeLayour의 nine 패치 이미지가 모든 내부 요소를 숨기는 이유는 무엇입니까?
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Just a simple white text which does not show up"
android:textColor="#ffffff"
/>
</RelativeLayout>
, 나는 텍스트를 얻을. 이런 일이 왜
android:background="@drawable/bg2" //normal image
는 사람이 설명 할 수 있습니까?
여기에 문제에 대한 명확한 답변이 나와 있습니다. http://stackoverflow.com/questions/3904852/android-layout-broken-with-9-patch-background –