Skip to content

Commit d993621

Browse files
author
Jens Claes
committed
add a getFirstVisibleHour method
1 parent 9f9b25b commit d993621

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/src/main/java/com/alamkanak/weekview/WeekView.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,14 @@ else if (hour * mHourHeight > mHourHeight * 24 - getHeight() + mHeaderTextHeight
13901390
invalidate();
13911391
}
13921392

1393+
/**
1394+
* Get the first hour that is visible on the screen.
1395+
* @return The first hour that is visible.
1396+
*/
1397+
public double getFirstVisibleHour(){
1398+
return -mCurrentOrigin.y / mHourHeight;
1399+
}
1400+
13931401

13941402

13951403
/////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)