我有一個彈出窗口顯示在我的xml中。它應該有一個邊框。以下是代碼: -如何在android xml中使用圖像作爲邊框
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="20dp" >
<RelativeLayout
android:id="@+id/rl_startpopup"
android:layout_width="340dp"
android:layout_height="320dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/popup_outline"
android:orientation="vertical" />
</RelativeLayout>
的popup_outline的形狀
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="270"
android:endColor="#192423"
android:startColor="#4a7669"
android:type="linear" />
<corners android:radius="8dp" />
<stroke
android:width="2dp"
android:color="#e4f4d3" />
</shape>
這裏彈出窗口的圖像: -
這種 「popup_outline」 是白顯示邊框。我想使用可重複的圖案圖像而不是一種顏色作爲邊框。我必須在xml中執行此操作。請幫助