// Path: saklib/src/main/java/com/wanjian/sak/layer/IClip.java
// public interface IClip {
//   void onClipChange(boolean clip);
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/layer/IRange.java
// public interface IRange {
//   void onStartRangeChange(int start);
//   void onEndRangeChange(int start);
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/utils/Utils.java
// public class Utils {
//     public static ViewRootImpl[] diff(ViewRootImpl[] views1, ViewRootImpl[] views2) {
//         List<ViewRootImpl> list1 = views1 == null ? new ArrayList<ViewRootImpl>() : Arrays.asList(views1);
//         List<ViewRootImpl> list2 = views2 == null ? new ArrayList<ViewRootImpl>() : Arrays.asList(views2);
//         List<ViewRootImpl> result = new ArrayList<>(32);
// 
//         for (ViewRootImpl view : list1) {
//             if (list2.contains(view) == false) {
//                 result.add(view);
//             }
//         }
//         ViewRootImpl[] array = new ViewRootImpl[result.size()];
//         result.toArray(array);
//         return array;
//     }
// 
//     public static Activity findAct(View view) {
//         List<WeakReference<Activity>> references = RunningActivityFetcher.fetch();
//         if (references == null) {
//             return null;
//         }
//         for (WeakReference<Activity> act : references) {
//             Activity activity = act.get();
//             if (activity == null) {
//                 continue;
//             }
//             if (view == activity.getWindow().getDecorView().getRootView()) {
//                 return activity;
//             }
//         }
//         return null;
//     }
// 
// }


import android.app.Activity;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Region;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.view.View;
import android.view.ViewGroup;
import com.wanjian.sak.layer.IClip;
import com.wanjian.sak.layer.IRange;
import com.wanjian.sak.utils.Utils;
import java.util.List;
package com.wanjian.sak.layer.impl;




public class FragmentNameLayer extends ActivityNameLayerView implements IRange, IClip {

  private int mStartLayer;
  private int mEndLayer = 100;// TODO: 2020/7/7
  private FragmentActivity mActivity;
  private Paint mBagPaint = new Paint();
  private boolean isClip = true;

  @Override
  protected void onAttach(View rootView) {
    super.onAttach(rootView);
    mBagPaint.setColor(Color.argb(63, 255, 0, 255));
// Path: saklib/src/main/java/com/wanjian/sak/layer/IClip.java
// public interface IClip {
//   void onClipChange(boolean clip);
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/layer/IRange.java
// public interface IRange {
//   void onStartRangeChange(int start);
//   void onEndRangeChange(int start);
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/utils/Utils.java
// public class Utils {
//     public static ViewRootImpl[] diff(ViewRootImpl[] views1, ViewRootImpl[] views2) {
//         List<ViewRootImpl> list1 = views1 == null ? new ArrayList<ViewRootImpl>() : Arrays.asList(views1);
//         List<ViewRootImpl> list2 = views2 == null ? new ArrayList<ViewRootImpl>() : Arrays.asList(views2);
//         List<ViewRootImpl> result = new ArrayList<>(32);
// 
//         for (ViewRootImpl view : list1) {
//             if (list2.contains(view) == false) {
//                 result.add(view);
//             }
//         }
//         ViewRootImpl[] array = new ViewRootImpl[result.size()];
//         result.toArray(array);
//         return array;
//     }
// 
//     public static Activity findAct(View view) {
//         List<WeakReference<Activity>> references = RunningActivityFetcher.fetch();
//         if (references == null) {
//             return null;
//         }
//         for (WeakReference<Activity> act : references) {
//             Activity activity = act.get();
//             if (activity == null) {
//                 continue;
//             }
//             if (view == activity.getWindow().getDecorView().getRootView()) {
//                 return activity;
//             }
//         }
//         return null;
//     }
// 
// }


// Path: saklib/src/main/java/com/wanjian/sak/layer/impl/FragmentNameLayer.java
import android.app.Activity;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Region;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.view.View;
import android.view.ViewGroup;
import com.wanjian.sak.layer.IClip;
import com.wanjian.sak.layer.IRange;
import com.wanjian.sak.utils.Utils;
import java.util.List;

package com.wanjian.sak.layer.impl;




public class FragmentNameLayer extends ActivityNameLayerView implements IRange, IClip {

  private int mStartLayer;
  private int mEndLayer = 100;// TODO: 2020/7/7
  private FragmentActivity mActivity;
  private Paint mBagPaint = new Paint();
  private boolean isClip = true;

  @Override
  protected void onAttach(View rootView) {
    super.onAttach(rootView);
    mBagPaint.setColor(Color.argb(63, 255, 0, 255));
    Activity activity = Utils.findAct(rootView);