設定ImageButton 的圖片 語法:t1.setImageResource(R.drawable.圖檔名稱) 範例: import android.widget.*; ImageButton t1 = (ImageButton) findViewById(R.id.imageButton1); t1.setImageResource(R.drawable.圖檔名稱);