-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] Xamarin.Forms label and button show flashing cursors (before and/or after the controls) when page appearing #10400
Comments
@KevinHu-au Are those labels and buttons inside a template in a CollectionView (or CarouselView)?. In this case, this issue seems to be the same as #7281 or #10294. |
This happens to me if i have a grid inside a collectionview with any row using GridUnitType.Absolute for height, so labels in this row will have the "cursor": |
This workaround may help you with labels. public class CustomLabelRenderer : Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer
{
public CustomLabelRenderer(Context context)
: base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Label> e)
{
base.OnElementChanged(e);
if (Control == null)
{
return;
}
Control.HorizontalScrollBarEnabled = false;
Control.VerticalScrollBarEnabled = false;
}
} Then add to android project AssemblyInfo (or over created class namespace if you wish) following code: [assembly: ExportRenderer(typeof(Label), typeof(CustomLabelRenderer))] |
There is not a CollectionView or CarouselView on this page. But I do use PancakeViews (https://github.com/sthewissen/Xamarin.Forms.PancakeView) for the white blocks. (But have tried Frame to replace pancakeview, the issue is still there) The above screen has UI hierarchy roughly like this. A grid with two rows. The first row contains a scroll view, and the second row contains a Xamarin.Forms button. Each white block is a pancake view with a bunch of labels
|
@Kubion70 . Thanks for your recommendation. It is working perfectly. Thanks for your rescue me out. |
Did the same for button to fix this issue |
Duplicate of #9019 |
Duplicate of #9591 |
Thanks @Kubion70, that will work for me until a proper fix is out. |
Description
Xamarin.Forms label and button show flashing cursors (before and/or after the controls) for 1-2 secs when page appearing, and disappear after that. The label and button are just regular Xamarin.Forms controls (not 3rd party controls)
Steps to Reproduce
Expected Behavior
Actual Behavior
Basic Information
Xamarin.Forms: 4.5.0.530
Screenshots
<
!
-- If the issue is a visual issue, please include screenshots showing the problem if possible -->
Reproduction Link
Workaround
Did try make the label/button disabled, not help.
The text was updated successfully, but these errors were encountered: