Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Button image is not centered #5861

Closed
CoffeePerry opened this issue Apr 9, 2019 · 6 comments
Closed

Button image is not centered #5861

CoffeePerry opened this issue Apr 9, 2019 · 6 comments

Comments

@CoffeePerry
Copy link

Description

I found a problem in Button's image centering when Application.MainPage property is set to a NavigationPage: image will be positioned on the left in the button, instead of in the center.

In App.xaml.cs, using:
MainPage = new NavigationPage(new HomePage());

Instead of:
MainPage = new HomePage();

In HomePage's buttons, images will be on the left instead of the center.

P.S.: I found this problem only in Android.

Steps to Reproduce

  1. In App.xaml.cs, use:
    MainPage = new NavigationPage(new HomePage());

Expected Behavior

In HomePage, buttons images are on the center.

Actual Behavior

In HomePage, buttons images are on the left.

Basic Information

  • Version with issue: Xamarin.Forms 3.6.0.264807
  • Last known good version: Xamarin.Forms 3.4.0.1029999
  • IDE: Microsoft Visual Studio Community 2019 16.0.0
  • Platform Target Frameworks:
    • iOS: 12.1 - I have NOT found this problem.
    • Android: Android Oreo 8.1 - API 27 - I have found this problem.
    • UWP: I have not tried yet.
  • Android Support Library Version: 28.0.0.1
  • Nuget Packages: Xamarin.Forms (3.6.0.264807); Xamarin.Essentials (1.0.1)

Screenshots

image

Reproduction Link

@samhouts samhouts added s/unverified New report that has yet to be verified p/Android i/regression labels Apr 9, 2019
@samhouts
Copy link
Member

@mattleibow I guess we didn't fix 'em all 😆 (referring to #4967)

@samhouts samhouts added e/2 🕑 2 and removed s/unverified New report that has yet to be verified labels Apr 12, 2019
@APopatanasov
Copy link

Is a fix expected to be applied soon? My image verification tests have failed because of this issue. 😄

@CoffeePerry
Copy link
Author

A way to get around this problem is using ImageButton intead of Buttton, for now.

@APopatanasov
Copy link

@CoffeePerry Thanks for the workaround. I have tested it and it works. For now I will use it. Still, I hope as the issue was introduced with one of the latest official releases to be addressed and fixed soon. Thanks again.

@CoffeePerry
Copy link
Author

@APopatanasov You're welcome

@samhouts samhouts added this to the 3.6.0 milestone May 29, 2019
@samhouts samhouts removed this from the 3.6.0 milestone Jun 21, 2019
@CoffeePerry
Copy link
Author

You solved, thanks!

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

No branches or pull requests

3 participants