I have had a user with a Nexus 7 feed back to me to say my app screens appear as expected except for my Spinners
, which appear much much larger than they should do.
Normal screen http://imgur.com/eG7b3
Large spinners on Nexus 7 http://imgur.com/X4Kqo
I have a Spinner
TextView
layout:
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_height="36dip"
android:layout_width="match_parent"
android:textSize="24.5sp"
android:textColor="#768766"
/>
which is produced by this RelativeLayout
:
<Spinner
android:id="@+id/spinner_weekday1"
android:layout_below="@id/col1day"
android:layout_height="wrap_content"
android:prompt="@string/enterday"
android:layout_width="200dip"
android:entries="@array/weekdaylist"
android:layout_marginRight="60dp"
android:layout_marginBottom="20dip"
android:textSize="24.5sp"
android:textColor="#768766"
/>
I have the app running on a range of other devices and it seems fine. Any ideas why the Nexus 7 might display Spinners
in this way?
OK, I have found the solution to this.
The Spinner layout I posted above was actually the Spinner from res/layout-xlarge and the Nexus is a large devices. The res/layout-large included the following xml:
android:textSize="200sp"
when it should have been:
android:textSize="20sp"
and this was of course why the spinner text was appearing so large.
I guess this highlights the difficulty of trying to manage multiple layout sizes without having a physical test device for each.
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