使用光标适配器的Andr​​oid微调的默认值 [英] android spinner default value using cursor adapter

查看:119
本文介绍了使用光标适配器的Andr​​oid微调的默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用我的应用程序spinnerbox。的spinnerbox是填充有从数据库项目。这本身就已经起作用。但是我需要在下拉列表中选择一个额外的项目。
我想第一个项目是一般一般不是一个项目。因此不从数据库中检索。有什么方法来无论是在THYE光标或适配器注资呢?

I am using a spinnerbox in my application. The spinnerbox is to be filled with projects from the database. This itself already works. However i need one extra item in the drop down list. I want the first item to be "general" general is not a project. Thus it is not retrieved from the database. Is there someway to either inject it in thye cursor or adapter?

推荐答案

我设法在differebt方式,然后我原本计划解决这个问题。但它工作得很好。取而代之的是常规选项。我做了一个复选框。它是检查,那么它一般和微调是setunabled。如果未选中它被设置为启用。这适用于我的情况。

I managed to solve this in a differebt way then i originally planned. But it works well. Instead of a general option. I made a checkbox. Is it checked, then its general and the spinner is setunabled. And if unchecked it gets set to enabled. This works for my situation.

这篇关于使用光标适配器的Andr​​oid微调的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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