private int getVerticalPosition(Area.VerticalMarker marker, View view, Drawable drawable) {
    RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) view.getLayoutParams();
    switch (marker) {
      case TOP:
        return view.getTop() + params.topMargin;
      case INNER_TOP:
        return view.getTop() + params.topMargin + drawable.getIntrinsicHeight();
      case INNER_BOTTOM:
        return view.getBottom() + params.bottomMargin;
      case BOTTOM:
      default:
        return view.getBottom() + params.bottomMargin + drawable.getIntrinsicHeight();
    }
  }
Class to represent a single area in an item.
It assumes that the item has been split in a 3x3 grid:
+----+----+----+ TOP
|    |    |    |
+--------------+ INNER TOP
|    |    |    |
+--------------+ INNER BOTTOM
|    |    |    |
+----+----+----+ BOTTOM
LEFT |    |    |
INNER LEFT|    |
    INNER RIGHT|
             RIGHT
dividers/src/main/java/com/karumi/dividers/Area.java