按钮没有得到焦点 [英] button not getting focus
本文介绍了按钮没有得到焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想提出一个应用程序有4个按钮它。我希望得到他们的重点只要鼠标或通过them.But一些指针移动我不能够做that.Please告诉我是什么问题。按钮的编码如下
i am making an application with 4 buttons in it.I want to get them the focus whenever the mouse or some pointer moves over them.But i am not able to do that.Please tell me what is the problem. The coding of buttons is as follows.
m_NextButton.requestFocus();
m_PrevButton.requestFocus();
m_SubmitButton.requestFocus();
m_SkipButton.requestFocus();
中的XML编码如下:
The xml coding is as follows:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/button_blue"/>
<item android:state_focused="true" android:drawable="@drawable/button_blue" />
<item android:drawable="@drawable/button_lightgreen" />
</selector>
先谢谢了。
推荐答案
在Android上,如网络机器人没有胡佛没有鼠标...
银河注可以胡佛事件,但它的手写笔只。
No mouse in Android, no hoover in android like web... The Galaxy Note can have hoover event, but by its 'stylus' only.
这篇关于按钮没有得到焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文