How can I check if the Android phone is in Landscape or Portrait?
I think this solution easy one
if (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){ user_todat_latout = true; } else { user_todat_latout = false; }