Code example for CheckBox

Methods: equals, isChecked, setChecked

0
		mClient.getConnectionManager().shutdown();
	} 
	 
	@Override 
	public void onClick(View v) {
		if(mCB.equals(v)) {
			if(mCB.isChecked()) {
				Toast.makeText(this, "Dags att logga in...", Toast.LENGTH_SHORT).show();
				Intent i = new Intent(this, OAuthHelper.class);
				startActivity(i);
			} else { 
				OAuthHelper.saveAuthInformation(mSettings, null, null);
				mButton.setEnabled(false);
				mEditor.setEnabled(false);
				mCB.setChecked(false);
				mUser.setText("");
			} 
			mCB.setChecked(false); // the oauth callback will set it to the proper state
		} else if(mButton.equals(v)) {
			String postString = mEditor.getText().toString();
			if (postString.length() == 0) {
				Toast.makeText(this, "You have to enter something", Toast.LENGTH_SHORT).show();
			} else {