2010-04-06 125 views
0

我想弄清楚如何在imagebutton上設置優先級。我 想要有一堆圖標或按鈕,可以是 通過觸摸,收音機或複選框選擇佈局。當這些圖像選擇 時,它們被設置在隊列中以按照 優先順序顯示。 (這是要預先確定的)。一旦觸摸了操作按鈕,圖像就會顯示。在按鈕上設置優先級

任何幫助將不勝感激。

謝謝

回答

0

您可以嘗試以下提到的一個佈局XML ...

android:nextFocusDown=<id of the next control to be focussed> 
android:nextFocusLeft=<id of the previous control to be focussed> 

或者設置監聽器在Java選項卡。例如,

if (<current control>.isFocused()) <next control>.requestFocus();