This is the Solution to this Problem
public class SuperActivity extends Activity implements OnClickListener,
OnItemClickListener {
protected static Button btn_logout;
protected static ListView lv_SlidingMenu;
protected static FlyOutContainer rootView;
protected static TextView tv_userName;
protected static TextView tv_memberSince;
protected static ImageView iv_userImage;
protected static ImageView iv_top_home;
protected static TextView tv_top_home;
protected ImageView iv_slidingmenu;
protected static SlidingMenuAdapter slidingMenuAdapter = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
// TODO Auto-generated method stub
switch(parent.getId()){
case R.id.list:
switch(position){
case 0:
GeneralDataModel.actionIntent = new Intent(this,
ActivityTheGreatControversy.class);
this.startActivity(GeneralDataModel.actionIntent);
break;
case 1:
break;
case 2:
GeneralDataModel.actionIntent = new Intent(this,
AtlastActivity.class);
this.startActivity(GeneralDataModel.actionIntent);
break;
case 3:
GeneralDataModel.actionIntent = new Intent(this,
MediaActivity.class);
this.startActivity(GeneralDataModel.actionIntent);
break;
case 4:
GeneralDataModel.actionIntent = new Intent(this,
TimeLineActivity.class);
this.startActivity(GeneralDataModel.actionIntent);
break;
case 6:
GeneralDataModel.actionIntent = new Intent(getApplicationContext(),
ActivityNotes.class);
this.startActivity(GeneralDataModel.actionIntent);
GeneralDataModel.actionIntent = null;
break;
case 10:
GeneralDataModel.actionIntent = new Intent(this,
ActivitySettings.class);
this.startActivity(GeneralDataModel.actionIntent);
rootView.toggleMenu();
break;
default:
rootView.toggleMenu();
break;
}
break;
}
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "CLICKEDiy", Toast.LENGTH_LONG)
.show();
switch (v.getId()) {
case R.id.btn_sliding_logout:
GeneralDataModel.actionIntent = new Intent(getApplicationContext(),
LoginSignup.class);
GeneralDataModel.actionIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(GeneralDataModel.actionIntent);
GeneralDataModel.actionIntent = null;
new SessionManager(this).logoutUser();
this.finish();
break;
case R.id.iv_home_slidingmenu:
rootView.toggleMenu();
break;
}
}
protected void fillSlidingMenu() {
tv_userName.setText(UserInformation.getFirstName() + " "
+ UserInformation.getLastName());
tv_memberSince.setText(UserInformation.getMemberSince());
lv_SlidingMenu.setAdapter(slidingMenuAdapter);
}
}
and derive your all activities from This Class
Then in their onClickListners just simply call super.onclick(v);