Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How can I make my Android picker options render as a box instead of a spinner?

$
0
0

On Android, my picker is rendering as this

I'd prefer it render as this

It's not the color that I'm having a hard time with, it's that it's being rendered as a spinner and I don't want that. I'm populating the picker by data binding to the ItemsSource property as described here.

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/picker/populating-itemssource

Here's my picker

<Picker ItemsSource="{Binding AmountFrequencyStrategies}" />`

Here's my view model

    private List<string> amountFrequencyStrategies;

    public PageViewModel()
    {
        this.amountFrequencyStrategies = new List<string>{ "one", "two", "three"};
    }

    public List<string> AmountFrequencyStrategies => this.amountFrequencyStrategies;

My version of xamarin.forms is 3.0.0.482510. My android manifest file has the following line

<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="27" />

I've posted this question to stackoverflow too:
https://stackoverflow.com/questions/50693096/how-can-i-make-my-picker-options-render-as-a-box-instead-of-a-spinner


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>