@@ -0,0 +1,892 @@
+package com.andela.voluminotesapp.utilities;%0A%0A%0Aimport android.graphics.Region;%0Aimport android.view.View;%0A%0Aimport com.andela.voluminotesapp.callbacks.OnIntersectListener;%0A%0A%0Apublic class Collision %7B%0A    private Region region1;%0A    private Region region2;%0A%0A    public Collision(View layout1, View layout2) %7B%0A        region1 = getRegion(layout1);%0A        region2 = getRegion(layout2);%0A    %7D%0A%0A    public void intersect(OnIntersectListener listener)%7B%0A        if (region1.op(region2, Region.Op.INTERSECT)) %7B%0A            listener.onIntersect();%0A        %7D%0A    %7D%0A%0A    private Region getRegion(View viewHolder) %7B%0A        int%5B%5D layout = new int%5B2%5D;%0A        viewHolder.getLocationOnScreen(layout);%0A        int x = layout%5B0%5D;%0A        int y = layout%5B1%5D;%0A        int width = viewHolder.getWidth();%0A        int height = viewHolder.getHeight();%0A%0A        return new Region(x, y, x + width, y + height);%0A    %7D%0A%7D%0A

Add class to detect collision on layouts