Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] ImageButton doesn't respect Padding when placed in a PopupPage #112

Open
AntPolkanov opened this issue Mar 13, 2024 · 0 comments

Comments

@AntPolkanov
Copy link

AntPolkanov commented Mar 13, 2024

Context:
I'd like to create an ImageButton with an icon and adjust the Padding to provide some space around the icon.

<ImageButton
        BackgroundColor="Brown"
        VerticalOptions="Center"
        HorizontalOptions="Center"
        CornerRadius="25"
        HeightRequest="50"
        WidthRequest="50"
        Padding="15"
        Source="icon_close"
        Clicked="ImageButton_OnClicked"
    />

Problem:
When this ImageButton is places on a popup page, the Padding is ignored on Android. Works fine on iOS.

Expected behaviour:
Padding creates space around the icon.

OS:
Android

Screenshots:
The popup has bluish transparent background, so it can be seen that the Green button respects padding, while Red button doesn't.

Figure: ✅ Padding is respected on iOS Figure: ❌ The red cross is ugly - Padding is not respected on Android

Repository:
https://github.com/AntPolkanov/MAUI.ImageButton.PaddingIssue

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant