tags:

views:

172

answers:

1

Hi,

I have an ImageView in my layout xml file. I set the width to wrap_content and height to fill_parent. In hierarchy viewer, the width is 2 px and height is 120 px. But when I see it on device, my 9-patch image for the image view does not stretch to 120 px. Can you please tell me how can I trouble shoot this 9 patch image does not stretch error?

Thank you.

A: 

You have to set android:scaleType in order for the ImageView to resize the 9-patch. Normally you will want to set it to fitXY.

miguel