I have a date/time picker which I want them to react according based on its layout.
Consider on landscape mode:
This is a perfect placement of what I
When screen orientation change than activity again recreated so do this :
int orientation = this.getResources().getConfiguration().orientation; if (orientation == Configuration.ORIENTATION_PORTRAIT) { //code for portrait mode } else { //code for landscape mode }
Happy coding!!