@@ -0,0 +1,1116 @@
+package com.heaven7.core.util;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Rect;%0Aimport android.util.DisplayMetrics;%0Aimport android.view.View;%0Aimport android.view.WindowManager;%0A%0A/**%0A * Created by heaven7 on 2016/10/27.%0A */%0Apublic final class ViewUtil %7B%0A%0A    public static void obtainFocus(View v)%7B%0A        if(v!=null)%7B%0A            v.setFocusable(true);%0A            v.setFocusableInTouchMode(true);%0A            v.requestFocus();%0A            v.requestFocusFromTouch();%0A        %7D%0A    %7D%0A%0A    /**%0A     * is the target view visible in local coordinate.%0A     * @param view the target view%0A     * @return true if visible.(visible means the view's all side can see).%0A     */%0A    public static boolean isVisibleInScreen(View view)%7B%0A        if(view == null)%7B%0A            throw new NullPointerException();%0A        %7D%0A        DisplayMetrics dm = new DisplayMetrics();%0A        WindowManager wm = (WindowManager) view.getContext().getSystemService(Context.WINDOW_SERVICE);%0A        wm.getDefaultDisplay().getMetrics(dm);%0A        return view.getLocalVisibleRect(new Rect(0, 0, dm.widthPixels, dm.heightPixels));%0A    %7D%0A%7D%0A

add viewUtil