Skip to content

Commit

Permalink
reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoobergs committed Mar 10, 2018
1 parent bf42607 commit 9973371
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/src/main/java/com/alamkanak/weekview/WeekView.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public boolean onSingleTapConfirmed(MotionEvent e) {
float y = e.getY() - mCurrentOrigin.y;
// If the tap was on add new Event space, then trigger the callback
if (mAddEventClickListener != null && mNewEventRect != null && mNewEventRect.rectF != null &&
mNewEventRect.rectF.contains(x,y)){
mNewEventRect.rectF.contains(x, y)) {
mAddEventClickListener.onAddEventClicked(mNewEventRect.event.getStartTime(), mNewEventRect.event.getEndTime());
return super.onSingleTapConfirmed(e);
}
Expand Down Expand Up @@ -377,7 +377,7 @@ top < getHeight() &&
right > mHeaderColumnWidth &&
bottom > 0
) {
RectF dayRectF = new RectF(left, top , right, bottom - mCurrentOrigin.y);
RectF dayRectF = new RectF(left, top, right, bottom - mCurrentOrigin.y);
newEvent.setColor(mNewEventColor);
mNewEventRect = new EventRect(newEvent, newEvent, dayRectF);
tempEvents.add(newEvent);
Expand Down Expand Up @@ -1041,21 +1041,21 @@ private void limitEventTime(List<Calendar> dates) {
}
}

private int getMinHourOffset(){
private int getMinHourOffset() {
return mHourHeight * mMinTime;
}

private float getEventsTop(){
private float getEventsTop() {
// Calculate top.
return mCurrentOrigin.y + mHeaderHeight + mHeaderRowPadding * 2 + mHeaderMarginBottom + mTimeTextHeight / 2 + mEventMarginVertical - getMinHourOffset();

}

private int getLeftDaysWithGaps(){
private int getLeftDaysWithGaps() {
return (int) -(Math.ceil(mCurrentOrigin.x / (mWidthPerDay + mColumnGap)));
}

private float getXStartPixel(){
private float getXStartPixel() {
return mCurrentOrigin.x + (mWidthPerDay + mColumnGap) * getLeftDaysWithGaps() +
mHeaderColumnWidth;
}
Expand Down

0 comments on commit 9973371

Please sign in to comment.