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

[Bug] [Android] Button ContentLayout does not respect the distance on Android #9227

Open
MhAllan opened this issue Jan 16, 2020 · 6 comments

Comments

@MhAllan
Copy link

MhAllan commented Jan 16, 2020

Description

Button ContentLayout does not respect the distance on Android

Steps to Reproduce

<Button Text="Test"
                ContentLayout="Right, 5"
		BackgroundColor="Blue"
		TextColor="White">
	<Button.ImageSource>
		<FontImageSource Size="30"
				Glyph="{StaticResource IconOk}"
				Color="White"
				FontFamily="{StaticResource IconFont}" />
	</Button.ImageSource>
</Button>

Expected Behavior

Correct on UWP:
uwp-btn-icon-right

Actual Behavior

Wrong on Android:
android-btn-icon-right

Basic Information

Latest everything

@michalsedlak
Copy link

Hi guys,
may I ask you what is the status of this issue? Do you plan to start to work on this bug in near future.

Thank you and I appreciate your work!

Michal

@kensykora
Copy link

We are seeing the same issue

Xamarin Forms 4.80.1269
Target Android 10 SDK
Android Support 28.0.0.3
Samsung Galaxy S10 (API 29)

Tooling
Visual Studio Community 2019 for Mac
Version 8.7.2 (build 4)
Installation UUID: 6c202af4-ad57-4769-b73a-b32194ddceb0
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
	Package version: 612000090

Mono Framework MDK
Runtime:
Mono 6.12.0.90 (2020-02/d3daacdaa80) (64-bit)
Package version: 612000090

Roslyn (Language Service)
3.7.0-6.20371.12+917b9dfae12e3b6cb266a3c062fb20a1e9d5fb06

NuGet
Version: 5.7.0.6702

.NET Core SDK
SDK: /usr/local/share/dotnet/sdk/3.1.401/Sdks
SDK Versions:
3.1.401
3.1.302
3.1.101
3.1.100
3.0.101
3.0.100
2.2.401
2.2.300
2.2.107
2.1.505
2.1.504
2.1.503
2.1.302
2.1.301
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks

.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.7
3.1.6
3.1.1
3.1.0
3.0.1
3.0.0
2.2.6
2.2.5
2.1.21
2.1.20
2.1.15
2.1.14
2.1.13
2.1.9
2.1.8
2.1.7
2.1.2
2.1.1
2.0.5

Xamarin.Profiler
Version: 1.6.12.29
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode 11.6 (16141)
Build 11E708

Xamarin.Mac
Version: 6.20.2.2 (Visual Studio Community)
Hash: 817b6f72a
Branch: d16-7
Build date: 2020-07-18 18:44:59-0400

Xamarin Designer
Version: 16.7.0.492
Hash: f5afe667d
Branch: remotes/origin/d16-7-vsmac
Build date: 2020-07-10 18:42:54 UTC

Xamarin.iOS
Version: 13.20.2.2 (Visual Studio Community)
Hash: 817b6f72a
Branch: d16-7
Build date: 2020-07-18 18:45:00-0400

Xamarin.Android
Version: 11.0.0.3 (Visual Studio Community)
Commit: xamarin-android/d16-7/aca845b
Android SDK: /Users/sykorkx/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
5.0 (API level 21)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 29.0.2

Build Information:
Mono: 83105ba
Java.Interop: xamarin/java.interop/d16-7@1f3388a
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-7@017078f

Microsoft OpenJDK for Mobile
Java SDK: /Users/sykorkx/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 16.7.0.13
Hash: 8380518
Branch: remotes/origin/dev/jmt/d16-7readconfig~2
Build date: 2020-07-23 22:38:02 UTC

Android Device Manager
Version: 16.7.0.18
Hash: 4b44bc1
Branch: remotes/origin/d16-7
Build date: 2020-07-23 22:38:26 UTC

Build Information
Release ID: 807020004
Git revision: 6b86e771c92aa2615d2c2a09919bb3d4ccb69a5a
Build date: 2020-08-12 07:16:26-04
Build branch: release-8.7
Xamarin extensions: 6b86e771c92aa2615d2c2a09919bb3d4ccb69a5a

Operating System
Mac OS X 10.15.6
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Sun Jul 5 00:43:10 PDT 2020
root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64

@acaliaro
Copy link

does a workaround exist for this?

@ivandamyanov
Copy link

I have this issue on Xamarin.Forms 5.0.0.2012 too

@MichaelNovikovHub
Copy link

The same issue on Xamarin.Forms 5.0.0.2291

@dhaval5382
Copy link

dhaval5382 commented Apr 30, 2024

I have also facing same spacing issue in windows side. Sometime it is a working fine but not spacing between icon and text on button.
ContentLayoutIsssue

                <Button  ContentLayout="Left,11"
                         Margin="24,0,0,0"
                         MinimumWidthRequest="140"
                         MinimumHeightRequest="55"
                         ImageSource="D:\Common.ClientMAUI\Images\btnlogin.png"
                         Text="Login"
                         x:Name="btnLogin">

Please share our valuable feedback as soon as possible

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

9 participants