最終更新:2012-10-14 (日) 15:04:10 (4205d)
android.widget.Button
Top / android.widget.Button
http://developer.android.com/reference/android/widget/Button.html
親クラス
例
public class MyActivity extends Activity { protected void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.content_layout_id); final Button button = (Button) findViewById(R.id.button_id); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform action on click } }); } }
イベントハンドリング
関連
- android:onClick?