2012-07-18 76 views
0

我正在製作一個應用程序,其中有4個按鈕。我想讓它們成爲焦點,只要鼠標或某個指針移過它們。但我無法做到這一點。請告訴我什麼是問題。按鈕的編碼如下。按鈕沒有得到重點

  m_NextButton.requestFocus(); 
    m_PrevButton.requestFocus(); 
    m_SubmitButton.requestFocus(); 
    m_SkipButton.requestFocus(); 

的XML編碼如下:預先

<?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> 

感謝。

+0

你應該閱讀這個:http://meta.stackexchange.com/questions/82825/how-i-can-improve-my-accept-rate-on-stack-overflow – Blackbelt 2012-07-18 08:23:47

+0

它的意思是?解釋 – 2012-07-18 08:28:09

+0

這意味着點擊問題左側的V來幫助你回答你的問題。 – 2012-07-19 07:52:11

回答

0

沒有鼠標在Android中,沒有hoover在像android這樣的機器人上... Galaxy Note可以有hoover事件,但只能通過它的'手寫筆'。