Bug 39523 - Label with FormattedText
Summary: Label with FormattedText
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.5
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jason Smith [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-03-10 17:31 UTC by Alessandro
Modified: 2017-06-20 15:33 UTC (History)
4 users (show)

Tags: ac label android
Is this bug a regression?: ---
Last known good build:


Attachments
Problem with Mediacom and Samsung, ok with Simulatore (122.64 KB, application/zip)
2016-03-10 17:31 UTC, Alessandro
Details
Screenshot and Test Project (208.83 KB, application/zip)
2016-03-29 15:48 UTC, Alessandro
Details
Zip File issue (5.64 MB, application/zip)
2016-03-30 10:00 UTC, Matteo Pezzoli
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 39523 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Alessandro 2016-03-10 17:31:16 UTC
Created attachment 15349 [details]
Problem with Mediacom and Samsung, ok with Simulatore

I friends.
I have a ContentPage with a Label

			Label labelTitolo = new Label ();
			labelTitolo.HeightRequest = 80;
	
			labelTitolo.TextColor = Color.Black;
			labelTitolo.BackgroundColor = Library.ColorIsoleSlot;
			labelTitolo.BindingContext = App.Globali.Attivita; //.destinazioni [App.Globali.DestinazioneCorrente];
			labelTitolo.SetBinding (Label.FormattedTextProperty,"Intestazione");
			
			labelTitolo.TextColor = Color.White;
			labelTitolo.FontSize = 40;
			labelTitolo.HorizontalOptions = LayoutOptions.FillAndExpand;
			labelTitolo.HorizontalTextAlignment = TextAlignment.Center;
			labelTitolo.VerticalOptions = LayoutOptions.Center;

The FormattedTextProperty is binded to this property

		public FormattedString Intestazione {
			get { 

				var fs = new FormattedString ();
				fs.Spans.Add (new Span { Text=codiceArticolo + " - " + descrizioneArticolo, ForegroundColor = Color.Black, Font = Font.SystemFontOfSize(14) });
				fs.Spans.Add (new Span { Text=" Slot ", FontAttributes = FontAttributes.Bold,  ForegroundColor = Color.Black, Font = Font.SystemFontOfSize(14) });
				fs.Spans.Add (new Span { Text=codiceSlot, ForegroundColor = Color.Black, Font = Font.SystemFontOfSize(14) });
				fs.Spans.Add (new Span { Text=" Colli ", FontAttributes = FontAttributes.Bold,  ForegroundColor = Color.Black, Font = Font.SystemFontOfSize(14) });
				fs.Spans.Add (new Span { Text=colliResidui + "/" + colliTotali, ForegroundColor = Color.Black, Font = Font.SystemFontOfSize(14) });
				return fs;
			}
		}

Sometimes this label is not rendered correctly

Some examples

Mediacom.png and Samsung.png are not rendered correctly (Samsung has the problem that the label is on "system bar" on the top...) Simulator is ok. Also on a Asus 10' it's ok...

Have you some suggestions?
If I replace FormattedText with Text, it's all ok

Alessandro
Comment 1 Rui Marinho 2016-03-11 18:27:06 UTC
Is the problem with the size or the position? 

Thanks
Comment 2 Alessandro 2016-03-11 18:33:28 UTC
The size and the position. The correct one is the "SIMULATOR"
Comment 3 Rui Marinho 2016-03-11 18:58:32 UTC
Ok thanks. We will investigate.
Comment 4 Jason Smith [MSFT] 2016-03-25 23:18:22 UTC
I sat down to attempt to reproduce the issue you are seeing but Im not sure I understand exactly what is going wrong for you. Can you please attach a reproduction project and exactly which phones you are using.
Comment 5 Alessandro 2016-03-26 14:24:31 UTC
@jasonsmith I try to create a project to reproduce the problem
Comment 6 Alessandro 2016-03-29 15:48:50 UTC
Created attachment 15543 [details]
Screenshot and Test Project

Hi Jason.
That's it. You find a screenshot of the problem under Mediacom and a screenshot of the Control Panel.
There is also the Android project...
We have problem also with a Samsung but now I can't test with it and I don't know which version of Android it use. When I have the Samsung in my hands I try.

Let me know.
Alessandro
Comment 7 Matteo Pezzoli 2016-03-30 10:00:53 UTC
Created attachment 15554 [details]
Zip File issue

Hi Jason, I am a colleague of Alessandro. I have updated the zip file with the screenshots of issue in the device 'Samsung' and 'Getac'.

Let us know, thanks
Matteo
Comment 9 Rui Marinho 2017-06-20 15:33:26 UTC
The label is cutted