我如何做一个微调的"禁用"国家照看残疾?残疾、如何做一个、国家、QUOT

2023-09-04 23:07:00 作者:本人已死

当我禁用我的微调,它看起来几乎完全一样它没有之前被禁用,即

When I disable my Spinner it looks almost exactly like it did prior to being disabled, i.e.

之后

有残疾等功能一切都很好,但我想它的看禁用。这个问题似乎已经被问了一圈陷阱( here和 这里 作为实例),但最接近的人是来回答是 这 ,这似乎不完整我不明白呢?!?

It is disabled and so functionally everything is fine but I'd like it to look disabled. This question appears to have been asked around the traps (here and here for instance) but the closest anyone's come to an answer is this, which appears incomplete and I don't understand anyway?!?

Romain说 这是将起固定在升级Froyo,但我使用蜂窝,你可以从截图看,它似乎并没有工作。任何意见将是AP preciated。

Romain said it was to be fixed in Froyo onwards but I'm using Honeycomb and as you can see from the screenshots, it doesn't appear to work. Any advice would be appreciated.

推荐答案

不知道你还需要这一点,但有一种方法。我一直在努力奋斗着这个问题我自己。最后我做这样的事情:

Don't know if you still need this but there is a way. I've been struggling with this issue myself. I ended up doing something like this:

((Spinner) spinner).getSelectedView().setEnabled(false);
spinner.setEnabled(false);

这是什么实际上做是禁用的微调和显示所选择的项目。最有可能选择的项目是 TextView的并应显示为已禁用的TextView

What this actually does is disable the spinner and the selected item that is shown. Most likely the selected item is a TextView and it should show as a disabled TextView.

我使用这个和它的作品。但由于某些原因未知对我来说,并不像灰色的其他残疾的看法。它看起来仍然禁用虽然。试试吧。

I am using this and it works. But for some reason unknown to me it is not as "greyed-out" as other disabled views. It still looks disabled though. Try it out.