You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am adding minute to timeline widget and i changed minutes interval to 5 minutes
public static final long MINUTE_INTERVAL = 5*60 * 1000;
after scrolling the interval display wrong values
[capture1]
`private void fillTimelineForMinuteResolution(final long startDate, long endDate, final int left) {
firstDay = true;
fillTimelineForMinuteResolution(MINUTE_INTERVAL, startDate, endDate, new ResolutionBlockFiller() {
int minuteCounter = getFirstMinuteOfVisibleRange(startDate);
boolean even = isEven(startDate);
@Override
public void fillResolutionBlock(int index, Date date, String currentYear, boolean lastTimelineBlock) {
int childCount = getResolutionDiv().getChildCount();
if (isValidChildIndex(index, childCount)) {
DivElement resBlock = DivElement.as(Element.as(getResolutionDiv().getChild(index)));
fillMinuteResolutionBlock(resBlock, date, index, minuteCounter, lastTimelineBlock, left, even);
minuteCounter = (minuteCounter + 1) % 60;
even = !even;
} else {
logIndexOutOfBounds("minute", index, childCount);
return;
}
}
private boolean isEven(long startDate) {
long normalDate = toNormalDate(startDate);
if (normalStartDate < normalDate) {
int minutes = (int) ((normalDate - normalStartDate) / MINUTE_INTERVAL);
return (minutes % 2) == 1;
}
return false;
}
private int getFirstMinuteOfVisibleRange(long startDate) {
long normalDate = toNormalDate(startDate);
if (normalStartDate < normalDate) {
int minutes = (int) ((normalDate - normalStartDate) / MINUTE_INTERVAL);
return ((firstMinuteOfRange + minutes) % 60);
}
return firstMinuteOfRange;
}
});
}`
in
Best Regards,
Hamzeh
The text was updated successfully, but these errors were encountered:
hi,
I am adding minute to timeline widget and i changed minutes interval to 5 minutes
public static final long MINUTE_INTERVAL = 5*60 * 1000;
after scrolling the interval display wrong values
[capture1]
`private void fillTimelineForMinuteResolution(final long startDate, long endDate, final int left) {
firstDay = true;
fillTimelineForMinuteResolution(MINUTE_INTERVAL, startDate, endDate, new ResolutionBlockFiller() {
in
![capture](https://cloud.githubusercontent.com/assets/977428/15930140/4625f1b6-2e62-11e6-8fc0-18710e8f55ba.PNG)
![capture1](https://cloud.githubusercontent.com/assets/977428/15930139/4625394c-2e62-11e6-8e2f-4a60065dd4d2.PNG)
Best Regards,
Hamzeh
The text was updated successfully, but these errors were encountered: