2011-07-11 48 views
1

我有一個圖像按鈕,我希望當鼠標懸停來更改圖像。安卓圖像按鈕 - 鼠標在

  <ImageButton android:id="@+id/btnClubs" 
       android:layout_width="wrap_content"   android:layout_height="wrap_content" 
       android:src="@drawable/clubs" > 
      </ImageButton> 

final ImageButton clubsButton = (ImageButton) findViewById(R.id.btnClubs); 

我注意到我不能放置方法mouseleave或mouseenter。 感謝

+2

鼠標?對於Android設備? – Egor

+1

鼠標懸停是什麼意思?你在哪裏得到一個在Android設備的鼠標??等待Android設備有一個鼠標... – Sujit

+0

所以我認爲鼠標 - 「手指在」,現在我還沒有任何設備,我測試只是與emultaor ,在這是「鼠標」。對不起,我的錯誤 –

回答

0

使用您ImageButton的背景Selector,我想你的意思是說焦點變化不是鼠標懸停