I need to change the horisontal position of Spinner's dropdown list. here's the screenshot :
and I want this dropdown list to go in one line under the main icon/text so it would look fine
As on the picture :
here's what I do in xml :
<Spinner
android:id="@+id/tvHeader"
style="@style/spinner_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ver_main_donate_background_tile_long"
android:layout_alignTop="@+id/ver_main_donate_background_tile_long"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/icon_main_header"
android:spinnerMode="dropdown"
android:dropDownHorizontalOffset="-15dp"
android:gravity="left|center_vertical"
android:text="@string/name_of_product" />
so, as I suppose,
android:spinnerMode="dropdown"
android:dropDownHorizontalOffset="-15dp"
should do the trick, but as you see on the screenshot it doesn't work
You can observe that the list items are aligned slight right, from the parent So i added a marginLeft attribute in spinner view
android:layout_marginLeft="20dp"
and thats worked for me, below you can see the difference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With