findViewById()
當在class檔中需要使用到介面的元件,就必須要用此方法來取得
ex) view 自訂名稱 = (view)findViewById(R.id.xxx)
Button bt = (Button)findViewById(R.id.bt);
例子中 xxx 是代表元件的id
findViewById()
當在class檔中需要使用到介面的元件,就必須要用此方法來取得
ex) view 自訂名稱 = (view)findViewById(R.id.xxx)
Button bt = (Button)findViewById(R.id.bt);
例子中 xxx 是代表元件的id
請先 登入 以發表留言。