【发布时间】:2013-04-10 21:21:55
【问题描述】:
我有一个可以在 2.2 到 4.x 设备上运行的应用。
当我在 4.x 上运行这个应用程序时,它看起来很酷,全息风格。但是当我在旧设备上运行它时,它似乎非常“轻巧”。
有一个截图,你可以比较:
这是我的清单:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
还有我的风格:
<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="android:Theme.Holo.Light.NoActionBar.Fullscreen">
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
很明显 holo 在 2.3 中不存在,但它应该呈现它的默认设备主题,对吧?
所以输入是正确的,但是 TextView 看起来太灰了。
有什么想法吗?
【问题讨论】:
-
在你的截图中看起来不是很灰...顺便说一句,你可能会觉得这很有趣:github.com/Prototik/HoloEverywhere
-
不是提示,标题从输入开始,左边是黑色,右边是灰色..
-
"很明显 holo 在 2.3 中不存在,但是它应该呈现它的默认设备主题,对吧?" -- 理想情况下,您使用版本化样式资源(例如,
res/values/、res/values-v11/),因此您可以具体地控制在预 Holo 设备上使用的基本主题。