我在选项卡布局内调用的 Activity 中制作了一个微调器。
问题是项目(数量为 3)显示在单独的对话框中,就像下拉列表的情况一样不是作为旋转器。
我关注了this例子。正如我期待的图片所示
但我得到这个:
&这个
.
我只想在微调器内显示 3 个项目,并且不希望选择这些项目的新对话框。我已经在 2.3.3 和 4.0.3 模拟器上尝试过我的代码。
有什么建议吗?
谢谢
最佳答案
作为下拉菜单的微调器是 HOLO 主题。第一张图片是 HOLO 主题,第二张和第三张不是。. 自 api 级别 11 起支持 Holo 主题..
如果你想应用Holo主题。设置
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />
values-v11文件夹内的和styles.XML
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
values文件夹内的和styles.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="android:Theme.Light.NoTitleBar">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="progressbar_holo" parent="@android:style/Theme.Light">
</style>
以及AndroidMeanifeast.xml
android:theme="@style/AppTheme"
在应用程序标签中。
或
关注这2个链接
1.https://github.com/ChristopheVersieux/HoloEverywhere
2.https://github.com/ChristopheVersieux/HoloEverywhere
关于android - 微调器将项目显示为下拉列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14214001/