Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- android:configChanges="keyboardHidden|orientation|screenSize"
- switch (getResources().getConfiguration().orientation) {
- case Configuration.ORIENTATION_PORTRAIT:
- setContentView(R.layout.control_layout_vertical);
- break;
- case Configuration.ORIENTATION_LANDSCAPE:
- setContentView(R.layout.control_layout_horizontal);
- break;
- }
Add Comment
Please, Sign In to add comment