Android: Using 9patch to create a frame around an imageview <p>I've been trying to create a frame around my imageview using a picture of a wooden frame. I turned the woodenframe picture into a 9patch and its still not wrapping around the imageview.</p> <pre><code>&lt;RelativeLayout android:id="@+id/ChosenPic" android:layout_width="match_parent" android:layout_height="50dp" android:layout_weight="3" android:orientation="vertical" android:padding="10dp" &gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:baselineAlignBottom="true" android:src="@drawable/ic_launcher" /&gt; &lt;ImageView android:id="@+id/ImageView02" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="fill_vertical|fill_horizontal" android:scaleType="fitXY" android:src="@drawable/woodenframe" &gt; &lt;/ImageView&gt; &lt;/RelativeLayout&gt; </code></pre> <p><a href="https://i.stack.imgur.com/3bgVH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3bgVH.jpg" alt="enter image description here"></a></p> <p>So this is the ninepatch and i want it to fit around a picture of my choosing no matter the size.</p> <p>EDIT:</p> <p>This is what i want: <a href="https://lh3.googleusercontent.com/1n_lKanRLjBPkXBr79vES3v3IwR20u5SDvQnbFztb7VOOFRlru6SRTX3RvNsp5PI2w=h900-rw" rel="nofollow noreferrer">https://lh3.googleusercontent.com/1n_lKanRLjBPkXBr79vES3v3IwR20u5SDvQnbFztb7VOOFRlru6SRTX3RvNsp5PI2w=h900-rw</a></p>