How to trouble shoot 9-patch image problem in android
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.
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.
精彩评论