android - How do I use a 9-patch? -
i have 9-patch image , want use "seperate" admob ad app. want draw light blue line ad is.
this 9-patch:
i added layout imageview , xml code:
<imageview android:id="@+id/imageview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/adview" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:src="@drawable/ab_transparent_example" />
and result:
but want 9-patch take size of screen, make full blue line left right of screen. i've never worked 9-patch before, doing wrong?
the diagram below pretty visual explanation of 9-patch is. specific problem, should set 9-patch background image.
<imageview android:id="@+id/imageview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/adview" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:background="@drawable/ab_transparent_example" />
Comments
Post a Comment