Skip to content

Commit

Permalink
Update comments and support library
Browse files Browse the repository at this point in the history
  • Loading branch information
alamkanak committed Jan 2, 2016
1 parent 769f027 commit 715c605
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
}

dependencies {
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
}

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
16 changes: 8 additions & 8 deletions library/src/main/java/com/alamkanak/weekview/WeekView.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float d

switch (mCurrentScrollDirection) {
case NONE: {
// allow scrolling only in one direction
// Allow scrolling only in one direction.
if (Math.abs(distanceX) > Math.abs(distanceY)) {
if (distanceX > 0) {
mCurrentScrollDirection = Direction.LEFT;
Expand All @@ -175,14 +175,14 @@ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float d
break;
}
case LEFT: {
// change direction if there was enough change
// Change direction if there was enough change.
if (Math.abs(distanceX) > Math.abs(distanceY) && (distanceX < -mScaledTouchSlop)) {
mCurrentScrollDirection = Direction.RIGHT;
}
break;
}
case RIGHT: {
// change direction if there was enough change
// Change direction if there was enough change.
if (Math.abs(distanceX) > Math.abs(distanceY) && (distanceX > mScaledTouchSlop)) {
mCurrentScrollDirection = Direction.LEFT;
}
Expand Down Expand Up @@ -486,7 +486,7 @@ private void drawTimeColumnAndAxes(Canvas canvas) {
// Draw the background color for the header column.
canvas.drawRect(0, mHeaderTextHeight + mHeaderRowPadding * 2, mHeaderColumnWidth, getHeight(), mHeaderColumnBackgroundPaint);

// Clip to paint in left column only
// Clip to paint in left column only.
canvas.clipRect(0, mHeaderTextHeight + mHeaderRowPadding * 2, mHeaderColumnWidth, getHeight(), Region.Op.REPLACE);

for (int i = 0; i < 24; i++) {
Expand Down Expand Up @@ -578,7 +578,7 @@ else if (mNewHourHeight > mMaxHourHeight)
}
}

// Clip to paint events only
// Clip to paint events only.
canvas.clipRect(mHeaderColumnWidth, mHeaderTextHeight + mHeaderRowPadding * 2 + mHeaderMarginBottom + mTimeTextHeight/2, getWidth(), getHeight(), Region.Op.REPLACE);

// Iterate through each day.
Expand Down Expand Up @@ -667,7 +667,7 @@ else if (day.before(today)) {
}


// Clip to paint header row only
// Clip to paint header row only.
canvas.clipRect(mHeaderColumnWidth, 0, getWidth(), mHeaderTextHeight + mHeaderRowPadding * 2, Region.Op.REPLACE);

// Draw the header background.
Expand Down Expand Up @@ -1740,8 +1740,8 @@ public void computeScroll() {
}

/**
* check if scrolling should be stopped
* @return true if scrolling should be stopped before reaching the end of animation
* Check if scrolling should be stopped.
* @return true if scrolling should be stopped before reaching the end of animation.
*/
private boolean forceFinishScroll() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
Expand Down

0 comments on commit 715c605

Please sign in to comment.