Code example for CheckBox

Methods: setOnClickListener

0
    } 
     
    public void addListenerOnIOS() { 
    	//chkIos = (CheckBox) findViewById(R.id.chkIos); 
    	 
    	chkIos.setOnClickListener(new OnClickListener() {
			 
			public void onClick(View v) {
				if (((CheckBox) v).isChecked()) {
					Toast.makeText(OsSelectActivity.this,
							"Bro, try Android :)", Toast.LENGTH_LONG).show();
				} 
				 
			} 
		}); 
    } 
     
    public void addListenerOnButton() { 
    	 
    	chkIos = (CheckBox) findViewById(R.id.chkIos);
        chkAnd = (CheckBox) findViewById(R.id.chkAnd);