/** * Whether it is landscape screen * @param activity activity * @return true - landscape screen, false - not landscape screen */ public static boolean isLandscape(Activity activity) { int requestedOrientation = activity.getRequestedOrientation(); return requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; }
Android gets whether the current screen is in landscape mode
Guess you like
Origin blog.csdn.net/savet/article/details/130719344
Ranking