vendredi 8 mai 2015

How to use 540x 960 HDPI 9 Patch images for 480x 800 resolution

I used the 9 Patch generator online. But when I create resources it creates the HDPI resource as 540x960 pixels. To my knowledge the HDPI resources are usually 480x800 pixels. How can I use the resources correctly.

  1. Is there a way to use the 540x960 px image in HDPI for 480x800 px also?
  2. How do I create a 9 patch resourse of 480x800 px to use it for HDPI resolution. Is there any other tool available?

The code used: <RelativeLayout xmlns:android="http://ift.tt/nIICcg" xmlns:tools="http://ift.tt/LrGmb4" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".Test" > <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tutorial" /> </RelativeLayout>

The image sample if you see has the sides not filled. I have verified the image is correctly 9 patched .

Aucun commentaire:

Enregistrer un commentaire