我有一个简单的微调代码,在我的电脑中 Android API 更新为棒棒糖,而我的同事PC则更新为 kitkat ,但用户界面显示如下,为什么会发生这种情况
棒棒糖
奇巧
activity.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#cfcfcf"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="vertical">
<Spinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:entries="@array/arr"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
Style.xml
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
<item name="android:spinnerItemStyle">@style/mySpinnerItemStyle</item>
<item name="android:spinnerDropDownItemStyle">@style/mySpinnerItemStyle</item>
</style>
<style name="mySpinnerItemStyle" parent="@android:style/Widget.Holo.DropDownItem.Spinner">
<item name="android:textSize">15sp</item>
<item name="android:textColor">#00ff00</item>
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>