layout messed up once spinner has entries
Posted
by
AndyAndroid
on Stack Overflow
See other posts from Stack Overflow
or by AndyAndroid
Published on 2011-01-03T09:48:21Z
Indexed on
2011/01/03
9:54 UTC
Read the original article
Hit count: 314
Hello,
I have
<LinearLayout android:id="@+id/LinearLayoutPlayer"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Spinner android:id="@+id/Spinner01"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_weight="100"></Spinner>
<ToggleButton android:text="@+id/ToggleButton01"
android:id="@+id/ToggleButton01" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_weight="1"></ToggleButton>
</LinearLayout>
Which displays a spinner and next to it a toggle button. Everything okay so far. Of course the spinner need some entries, so I add to the spinner the attribute:
android:entries="@array/myentries"
The problem now is that the toggle button is a bit lower than the spinner and the botton of the toggle button is cut off, maybe 3 or 5 lines of pixels.
Anyone an idea what is wrong here? Android is version 2.2
Thanks!
© Stack Overflow or respective owner