Android-宣告c1的CheckBox物件變數並且和xml上的id=checkBox1物件映射連接
語法:CheckBox c1 = (CheckBox) findViewById(R.id.checkBox1);
範例:
import android.widget.*;
CheckBox c1 = (CheckBox) findViewById(R.id.checkBox1);
本文由 jashliaoeuwordpress 提供 原文連結