Reputation: 3840
I am trying to change the slider's Height/Thickness in order to have a less ankward touch interaction on Android.
I am using a handler.
This is what I tried :
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
Microsoft.Maui.Handlers.SliderHandler.Mapper.AppendToMapping("MyCustomization", (handler, view) =>
{
#if ANDROID
// Update slider thickness
handler.PlatformView.LayoutParameters = new Android.Views.ViewGroup.LayoutParams(100, 100);
handler.PlatformView.MinHeight = 100;
handler.PlatformView.SetMinimumHeight(100);
#endif
});
}
}
None of these works. I am sure that the mapper is registering correctly because I tried some more trivial case successfully :
handler.PlatformView.Min = 1;
handler.PlatformView.Max = 100;
handler.PlatformView.Progress = 50; // Set slider progress to 50%
How can I change the slider trackbar and thumb interaction height ?
Upvotes: 0
Views: 827
Reputation: 13879
Yes, it is just the case as you said.
And I have created a new issue about this problem, you can follow it up here: https://github.com/dotnet/maui/issues/10259 .
Thanks for your support and feedback for maui.
Best Regards.
Upvotes: 0