Code example for OrientationEventListener

Methods: disable

0
 
	@Override 
	public void onPause() { 
		super.onPause(); 
		if (orientationListener != null)
			orientationListener.disable();
	} 
 
	@Override 
	public void onStatisticPagerChangedCallback(int page) {
		// TODO Auto-generated method stub 
		if (page == 0 ) {
			((TextView) findViewById(R.id.titlebar_textview)).setText("Activity Level");
			((Button) findViewById(R.id.btn_settings_done))
					.setVisibility(View.GONE);
		} 
		 
		else if (page == 1 ) {
			((TextView) findViewById(R.id.titlebar_textview)).setText("Sleep Level");
			((Button) findViewById(R.id.btn_settings_done))
					.setVisibility(View.GONE);