jaredrummler / MaterialSpinner

A spinner view for Android
Apache License 2.0
1.32k stars 217 forks source link

Cannot add two spinner under same layout #144

Open SyedMdKamruzzaman opened 3 years ago

SyedMdKamruzzaman commented 3 years ago

I add two spinner in same layout but it shows only one

<com.jaredrummler.materialspinner.MaterialSpinner android:id="@+id/spinner" app:ms_dropdown_max_height="350dp" app:ms_dropdown_height="wrap_content" android:layout_width="match_parent" android:layout_height="wrap_content"/>

<com.jaredrummler.materialspinner.MaterialSpinner
    android:id="@+id/tempUnit"
    android:layout_marginTop="150dp"
    app:ms_dropdown_max_height="350dp"
    app:ms_dropdown_height="wrap_content"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
RikySaepuloh commented 5 months ago

Can you provide your rest of codes? I mean your parent view, is it Horizontal LinearLayout? or anything else?

It looks like you want to set the both view layout_width as match_parent. Please keep in mind that you need to consider the layout width and height.