开发者

How can i do unfocusable a element of my user interface?

i have a element, that i want to be disabled in a 开发者_如何学编程situation.

ok. i do it with this:

Weekend.setEnabled(false);

ok, but it still remains focusable, i mean that when user press down/up keys or moves the scroll, the element still can get the focus (orange colour).

i tryed with this:

Weekend.setEnabled(false); Weekend.setFocusable(false); Weekend.setFocusableInTouchMode(false);

but doesn't works!!!! it still can be oranged when user press up/down keys and moves the windows with the scrollbar


I'm not sure if there's a non-focusable property you can set, but you could use an onFocusChangeListener to move the focus to a different element when your disabled one becomes focused.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜