Code example for Activity

Methods: runOnUiThread

0
 
	private void maScreenSetOrientationHelper(final int androidScreenOrientation)
	{ 
		final Activity activity = mContext;
 
		activity.runOnUiThread(new Runnable()
		{ 
			@Override 
			public void run() 
			{ 
				activity.setRequestedOrientation(androidScreenOrientation);
			} 
		}); 
	} 
 
	protected int getSupportedOrientations() 
	{ 
		if (mSupportedOrientations != 0x000000)
		{ 
			return mSupportedOrientations;
		}