// Path: EasyAndroid/src/main/java/com/ayvytr/easyandroid/tools/withcontext/ResTool.java
// public static Configuration getConfiguration()
// {
//     return getResources().getConfiguration();
// }


import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.util.DisplayMetrics;
import android.view.Surface;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import static com.ayvytr.easyandroid.tools.withcontext.ResTool.getConfiguration;

    }

    /**
     * 设置屏幕为竖屏
     *
     * @param activity activity
     */
    public static void setPortrait(Activity activity)
    {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    /**
     * 判断是否横屏
     *
     * @return {@code true} 是横屏<br>
     */
    public static boolean isLandscape()
    {
        Configuration configuration = getConfiguration();
        return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE;
    }

    /**
     * 判断是否竖屏
     *
     * @return {@code true} 是竖屏<br>
     */
    public static boolean isPortrait()
    {

// Path: EasyAndroid/src/main/java/com/ayvytr/easyandroid/tools/withcontext/ResTool.java
// public static Configuration getConfiguration()
// {
//     return getResources().getConfiguration();
// }


// Path: EasyAndroid/src/main/java/com/ayvytr/easyandroid/tools/withcontext/ScreenTool.java
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.util.DisplayMetrics;
import android.view.Surface;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import static com.ayvytr.easyandroid.tools.withcontext.ResTool.getConfiguration;

    }

    /**
     * 设置屏幕为竖屏
     *
     * @param activity activity
     */
    public static void setPortrait(Activity activity)
    {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    /**
     * 判断是否横屏
     *
     * @return {@code true} 是横屏<br>
     */
    public static boolean isLandscape()
    {
        Configuration configuration = getConfiguration();
        return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE;
    }

    /**
     * 判断是否竖屏
     *
     * @return {@code true} 是竖屏<br>
     */
    public static boolean isPortrait()
    {

        Configuration configuration = getConfiguration();
