Slider vs SeekBar on Xamarin.Android in Visual Studio 2022

Nathan Sokalski 4,111 Reputation points
2024-09-28T15:41:07.3533333+00:00

I am working on adding a Slider or SeekBar to a Xamarin.Android app. There are 2 scenarios in which I will be using this. The first one is just a simple standard select a value from x to y scenario. The second scenario is more unique, although I have seen it used (whether it was designed using a Slider, SeekBar or maybe something else altogether). It is what I would call an "Infinite Slider", which is a slider that allows the user to select any value from -infinity to +infinity by sliding the background rather than the thumb, so the thumb would always be in the center of the slider. I don't know if there is a View/control with this functionality built in or whether I would have make a custom View (possibly by inheriting from Slider or SeekBar), although it would require overriding so many properties & events that it might sometimes be better to just completely design it myself. But here are some of my main questions:

  1. Is SeekBar or com.google.android.material.slider.Slider usually better? SeekBar shows up better in the Designer while the Slider does not, but maybe that is just something I need to change.
  2. Do either of these have the "Infinite Slider" capability I mention above?
  3. Are there any significant differences that would affect the general usage?

Any help would be appreciated, thanks!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,363 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,942 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,221 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Liqun Shen (Shanghai Wicresoft Co Ltd) 235 Reputation points Microsoft Vendor
    2024-09-30T07:02:03.9533333+00:00

    Xamarin support ended on May 1, 2024 for all Xamarin SDKs including Xamarin.Forms. For more information, please check: Xamarin official support policy | .NET (microsoft.com). We will recommend you upgrade Xamarin projects to . NET MAUI, please see the Upgrade Xamarin.Android, Xamarin.iOS, and Xamarin.Mac projects to .NET documentation.

     

    Best Regards,

     


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.