Skip to content

[Android] ImageButton Border Not Rendering Correctly with URI and File Images when applying Aspect property #29956

@NafeelaNazhir

Description

@NafeelaNazhir

Description

  • When using an ImageButton with URI image source , the border does not render correctly on Android for certain aspect settings:

With Aspect="AspectFill": Only the top and bottom borders are visible; the left and right borders are not visible.
With Aspect="Center": The border is completely hidden and not visible on any side.

  • When using an ImageButton with FileImageSource, the border does not render correctly on Android for certain aspect settings:

With Aspect="AspectFill": Only the top and bottom borders are visible; the left and right borders are not visible.

Expected Output Actual Output
Screen.Recording.2025-06-12.at.4.21.18.PM.mov
Screen.Recording.2025-06-12.at.4.20.01.PM.mov

Steps to Reproduce

  1. Run the attached sample ImageButtonBorderIssue.zip
  2. Select Aspect= AspectFill and Center observe the behavior.
  3. Change source as botnet_bot.png file and select Aspect=AspectFill observe that only the top and bottom borders are visible; the left and right borders are not visible.

Expected Behavior
The border should be visible on all four sides of the ImageButton for any image source and aspect setting.

Actual Behavior
With AspectFill: Only top and bottom borders are visible; left and right borders are missing.
With Aspect=Center: The border is not visible at all.

Link to public reproduction project repository

No response

Version with bug

9.0.70 SR7

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions