微调显示项目为下拉列表 [英] Spinner showing items as Drop Down List

查看:164
本文介绍了微调显示项目为下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在活性的纺丝器获取调用一个标签布局内。结果,问题在于,所述物品(3号)。在一个单独的对话框被显示在一个下拉列表,而不是的情况下,作为一个微调。搜索结果我跟着这个例子。如图所示的画面,我期待结果结果,但我得到这个:结果&搜索放大器;这个结果搜索结果我想说明的离心器内仅有3项,做不希望新对话框中选择的项目。我已经尽了code无论在2.3.3和4.0.3模拟器。搜索结果有什么建议?
结果谢谢

I have made a spinner in an activity getting called inside a tab layout.
The problem is that the items (3 in nos.) are being showing in a separate dialog as in case of a drop down list and not as a spinner.

I followed this example. And as shown the picture I was expecting

but I am getting this:

& this
.

I want to show just 3 items inside the spinner and do not want the new dialog for the items to be selected. And I have tried my code both on 2.3.3 and 4.0.3 emulators.

Any suggestions?
Thanks

推荐答案

微调为下拉是HOLO主题。第一个图像是HOLO主题与第二和第三的是不是..全息主题是因为支持API级别11 ..

spinner as a dropdown is of HOLO Theme. first image is of HOLO Theme and 2nd and 3rd is not.. holo theme is supported since api level 11..

如果你想申请的Holo主题。设置

if you want to apply Holo Theme. set

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />

styles.XML 值-V11 文件夹

<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>

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

这篇关于微调显示项目为下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆