Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //this is called when the screen rotates.
- // (onCreate is no longer called when screen rotates due to manifest, see: android:configChanges)
- @Override
- public void onConfigurationChanged(Configuration newConfig)
- {
- super.onConfigurationChanged(newConfig);
- int orientation = newConfig.orientation;
- if (orientation == Configuration.ORIENTATION_PORTRAIT)
- {
- Log.d("tag", "Portrait");//Do your layout changes here
- }
- else if (orientation == Configuration.ORIENTATION_LANDSCAPE)
- {
- Log.d("tag", "Landscape");//Do your layout changes here
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement