Quantcast
Viewing all articles
Browse latest Browse all 76418

How do I use 9-Patch images in for Android?

Hi, I'm trying to create the good 'ol speech bubble in Xaml. I have a custom control that uses a custom renderer for iOS, and on that platform I create a resizable image. It's working great.

However, I'm having trouble getting this to work for Android using a 9-Patch image, but it looks like the image is being scaled normally, not respecting the guides I have in the image. Am I missing something here?

My Xaml looks like the following. CapInsetImage derives from Image, and has a custom renderer for iOS. From what I understand about 9-patch images, I shouldn't need a custom renderer for Android... should I? I have also attached my 9-patch image to this post.

<controls:CapInsetImage
    CapInsets="43,31,42,14"
    VerticalOptions="FillAndExpand"
    HorizontalOptions="FillAndExpand"
    Source="incoming_bubble.png"
    Aspect="Fill" />

I'd appreciate any help to point me in the right direction!


Viewing all articles
Browse latest Browse all 76418

Trending Articles