Guest User

Untitled

a guest
Jun 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. setContentView(R.layout.login_activity);
  2.  
  3. <activity
  4. android:name=".activities.Login"
  5. android:configChanges="keyboardHidden|screenSize" />
  6.  
  7. @Override
  8. public void onConfigurationChanged(Configuration newConfig) {
  9. super.onConfigurationChanged(newConfig);
  10. Log.d(TAG, "onConfigurationChanged() " + newConfig.orientation);
  11. if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE)
  12. {
  13. //myCode
  14. } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
  15. //myCode
  16. }
  17. }
Add Comment
Please, Sign In to add comment