public static int getTimeLineViewType(int position, int totalSize) {
        if(totalSize == 1) {
            return LineType.ONLYONE;
        } else if(position == 0) {
            return LineType.START;
        } else if(position == totalSize - 1) {
            return LineType.END;
        } else {
            return LineType.NORMAL;
        }
    }
Gets timeline view type.

@param position the position of current item view
@param totalSize the total size of the items
@return the timeline view type
timelineview/src/main/java/com/github/vipulasri/timelineview/TimelineView.java