我有以下的方法,我想了幾個按鈕來顯示圖像和按鈕的點擊休息時,應該是看不見的。無論其他v.getId()是我希望它是不可見的。檢測按鈕被點擊,並使其不可見
public void onClick(View v)
{
if(v.getId() == R.id.d){
imgD.setVisibility(View.VISIBLE);
}else if(v.getId() == R.id.i){
imgI.setVisibility(View.VISIBLE);
}else if(v.getId() == R.id.l){
imgL.setVisibility(View.VISIBLE);
}else{
//if other buttons are clicked then the button must be invisible.
}
}
沒有ü累了的財產? – KOTIOS
請正確解釋我不能站立? –
或此鏈接聊天我西港島線幫助ü正確http://chat.stackoverflow.com/rooms/522/android-for-life –