Button logout = (Button) this.findViewById(R.id.btlogout); logout.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { // TODO Auto-generated method stub connection.disconnect(); setContentView(R.layout.login); } });
this code is allowing me logout but not killing the session and the page which i am redirecting that page's button is not working .