• <bdo id='CT8xA'></bdo><ul id='CT8xA'></ul>
    1. <legend id='CT8xA'><style id='CT8xA'><dir id='CT8xA'><q id='CT8xA'></q></dir></style></legend>

      <small id='CT8xA'></small><noframes id='CT8xA'>

    2. <tfoot id='CT8xA'></tfoot>
      <i id='CT8xA'><tr id='CT8xA'><dt id='CT8xA'><q id='CT8xA'><span id='CT8xA'><b id='CT8xA'><form id='CT8xA'><ins id='CT8xA'></ins><ul id='CT8xA'></ul><sub id='CT8xA'></sub></form><legend id='CT8xA'></legend><bdo id='CT8xA'><pre id='CT8xA'><center id='CT8xA'></center></pre></bdo></b><th id='CT8xA'></th></span></q></dt></tr></i><div id='CT8xA'><tfoot id='CT8xA'></tfoot><dl id='CT8xA'><fieldset id='CT8xA'></fieldset></dl></div>

      如何在android中像没有微调器的微调器一样弹出列表?

      How to popup list like a spinner without spinner in android?(如何在android中像没有微调器的微调器一样弹出列表?)
    3. <legend id='Jx6RV'><style id='Jx6RV'><dir id='Jx6RV'><q id='Jx6RV'></q></dir></style></legend>

        • <i id='Jx6RV'><tr id='Jx6RV'><dt id='Jx6RV'><q id='Jx6RV'><span id='Jx6RV'><b id='Jx6RV'><form id='Jx6RV'><ins id='Jx6RV'></ins><ul id='Jx6RV'></ul><sub id='Jx6RV'></sub></form><legend id='Jx6RV'></legend><bdo id='Jx6RV'><pre id='Jx6RV'><center id='Jx6RV'></center></pre></bdo></b><th id='Jx6RV'></th></span></q></dt></tr></i><div id='Jx6RV'><tfoot id='Jx6RV'></tfoot><dl id='Jx6RV'><fieldset id='Jx6RV'></fieldset></dl></div>
        • <tfoot id='Jx6RV'></tfoot>
                <tbody id='Jx6RV'></tbody>

              <small id='Jx6RV'></small><noframes id='Jx6RV'>

                <bdo id='Jx6RV'></bdo><ul id='Jx6RV'></ul>
                本文介绍了如何在android中像没有微调器的微调器一样弹出列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的活动中有一个微调器小部件,可让用户选择列表名称.

                I have a spinner widget in my activity which lets users pick a list name.

                通常,微调器的功能是在列表之间切换,但在某些情况下,我换掉了选择更改侦听器,以使用相同的选项列表执行不同的功能.一旦做出选择,旧的听众就会恢复,生活继续.

                Normally, the function of the spinner is to switch between lists but for a couple of instances, I swap out the selection change listener to perform a different function with the same list of options. Once the selection has been made, the old listener is restored and life goes on.

                这是一个糟糕且错误的安排.相反,我想要一个函数,它只接受一个选择侦听器和一些其他参数,并显示一个弹出列表,该列表由与微调器相同的光标(或相同的光标)填充,而不使用微调器本身.

                This is a bad and buggy arrangement. Instead, I would like to have a function that just takes a selection listener and some other parameters and shows a popup list that's populated by the same cursor (or and identical cursor) as the spinner, without using the spinner itself.

                有什么办法可以做到吗?

                Is there any way I can do this?

                推荐答案

                使用 AlertDialog.Builder 并通过 setAdapter() 提供一个 Adapter生成你的行.

                Use AlertDialog.Builder and supply an Adapter via setAdapter() that generates your rows.

                在您的情况下,我不会使用相同的 Cursor,因为 Cursor 具有当前行的固有概念,因此会弄乱 Cursor 当你的 SpinnerAdapter 使用它时,可能会搞砸 Spinner.使用相同的 Cursor.

                In your case, I would not use the same Cursor, as a Cursor has an intrinsic notion of the current row, and so messing with the Cursor while it is used by your SpinnerAdapter could screw up the Spinner. Go with an identical Cursor.

                这篇关于如何在android中像没有微调器的微调器一样弹出列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
                SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
                Android file copy(安卓文件拷贝)
                Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)
                Android copy image from gallery folder onto SD Card alternative folder(Android将图像从图库文件夹复制到SD卡替代文件夹)
                Is there a tool to find unused resources in an Android project?(是否有工具可以在 Android 项目中查找未使用的资源?)

                <small id='XuluS'></small><noframes id='XuluS'>

                      • <bdo id='XuluS'></bdo><ul id='XuluS'></ul>

                        <tfoot id='XuluS'></tfoot>

                            <tbody id='XuluS'></tbody>
                          <legend id='XuluS'><style id='XuluS'><dir id='XuluS'><q id='XuluS'></q></dir></style></legend>
                        1. <i id='XuluS'><tr id='XuluS'><dt id='XuluS'><q id='XuluS'><span id='XuluS'><b id='XuluS'><form id='XuluS'><ins id='XuluS'></ins><ul id='XuluS'></ul><sub id='XuluS'></sub></form><legend id='XuluS'></legend><bdo id='XuluS'><pre id='XuluS'><center id='XuluS'></center></pre></bdo></b><th id='XuluS'></th></span></q></dt></tr></i><div id='XuluS'><tfoot id='XuluS'></tfoot><dl id='XuluS'><fieldset id='XuluS'></fieldset></dl></div>