Maybe easy question on Forms Picker thats driving me crazy.

BrentSaferBrentSafer USMember ✭✭
edited November 8 in Xamarin.Forms

Same picker looks different in two different projects.
I have two projects with the same page.xaml. Same Android compile level 7.1, same Xamarin.Forms and Xamarin.Forms.Pages (2.3.4.270), running Kitkat 4.4 API 19 emulator.
First is a larger project that been working on for long time, has may nugets but none about picker and no custom renderers. Second very basic project.
The first picker shows like this (all pickers in that app look like this (big popup with all selections).

Second smaller app - Looks like a spinner:

The picker is as simple as it gets and is same on both.

<Picker.Items>
abc 1
def 2
ghi 3
jkh 4
lmn 5
def 6
</Picker.Items>

Does anyone know how this can be? What else can I look at?
Thanks.
Brent

Answers

  • RasmusVindRasmusVind USMember ✭✭

    what are the android themes in the MainActivity in the android project?
    above the class declaration and below the namespace...

  • BrentSaferBrentSafer USMember ✭✭

    Based on your question I found what is difference. i don't know why it would make it different, but obviously different programs.
    in MainActivity.cs
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity

    second smaller project with spinner type picker.
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity

    I use the FormsAppCompatActivity in larger project so I can have the TabLayoutResource/ToolbarResource control in android.

    This makes picker different. What else does it affect? I wonder.

Sign In or Register to comment.