Android: Slider in Grid not very responsive

DirkWilhelmDirkWilhelm USMember ✭✭✭✭

Hello,

i'm trying to use a slider in a grid layout:

Grid grid = new Grid
{
    VerticalOptions = LayoutOptions.FillAndExpand,
    RowDefinitions = 
        {
            new RowDefinition { Height = GridLength.Auto}
        },

    ColumnDefinitions =
        {
            new ColumnDefinition { Width = new GridLength(150, GridUnitType.Absolute)},
            new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }
        }
};

Slider sliderStrecke = new Slider
{
    Minimum = 0,
    Maximum = 5000,
    Value = 1000,
    VerticalOptions = LayoutOptions.CenterAndExpand
};
sliderStrecke.ValueChanged += OnSliderStreckeValueChanged;

grid.Children.Add(new Label
{
    Text = "Strecke",
    Font = Font.BoldSystemFontOfSize(20),
    VerticalOptions = LayoutOptions.CenterAndExpand
}, 0, 0);

grid.Children.Add(sliderStrecke, 1, 0);

On IOS devices the slider works fine.

On Android devices it is very difficult to "hit" the slider circle to drag it.

In the forms gallary example app the slider works fine on android, but it is not in a grid layout, so i assume that the problem is with the grid.

What can i do?

Regards,
Dirk

Posts

Sign In or Register to comment.