xamarin/Xamarin.Forms
[Android] Image on Button is not centered with text
Aperta
#3527 aperta il 9 ago 2018
a/buttone/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs
Metriche repository
- Star
- (5644 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Description
The Image is not in the center on Button when displaying with a text.
Steps to Reproduce
- Create a Button with an image & text.
- Set thee HorizontalOption to Fill&Expand.
- You can see that the image is stick to the left border
- If you change the position(Top,Right...) of the image it will stick on the position selected, not centered with the text
Expected Behavior
The image have to stick the text on the center.
Actual Behavior
The Image is stick to the border depends of the selected position. I was searching a way to make a correction on UpdateBitmap But PropertyName "Image" never pass to UpdateBitmap
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == Button.TextProperty.PropertyName)
UpdateBitmap();
base.OnElementPropertyChanged(sender, e);
}
Basic Information
- Xamarin.Forms: 3.1.0.697729
- Android: 8.1