NumberPicker Customization

Nathan Sokalski 4,111 Reputation points
2022-12-02T04:41:51.367+00:00

I am attempting to add several NumberPicker(s) to my app. I have managed to add the NumberPicker tags to my xml & give them basic functionality, but I cannot seem to find much info on how to modify the appearance. I have looked at the documentation at:

https://developer.android.com/reference/android/widget/NumberPicker
https://learn.microsoft.com/en-us/dotnet/api/android.widget.numberpicker?view=xamarin-android-sdk-12

But there is very little detail about how to use the properties related to the visual appearance. Are there any good tutorials or details about how to customize the visual appearance of NumberPicker? Thanks.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,366 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 45,566 Reputation points Microsoft Vendor
    2022-12-07T01:55:31.657+00:00

    Hello,

    In fact, the custom extensibility of the native Android control NumberPicker is poor.

    The appearance of NumberPicker is only relevant to the theme, which is mainly designed from the point of view of appearance consistency.

    If you want to customize its appearance, then you need to rewrite a NumberPicker control, or set the theme to achieve this, you could refer to the following code:

       android:theme="@android:style/Theme.NoTitleBar"  
    

    Best Regards,

    Alec Liu.


    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

0 additional answers

Sort by: Most helpful

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.