{"action":"created","issue":{"url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/106","labels_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/106/comments","events_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/106/events","html_url":"https://github.com/alamkanak/Android-Week-View/issues/106","id":67961161,"number":106,"title":"goToHour bug - Cannot scroll to an hour which will result the calendar to go off the screen","user":{"login":"piotrwojtowicz","id":11367760,"avatar_url":"https://avatars.githubusercontent.com/u/11367760?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrwojtowicz","html_url":"https://github.com/piotrwojtowicz","followers_url":"https://api.github.com/users/piotrwojtowicz/followers","following_url":"https://api.github.com/users/piotrwojtowicz/following{/other_user}","gists_url":"https://api.github.com/users/piotrwojtowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrwojtowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrwojtowicz/subscriptions","organizations_url":"https://api.github.com/users/piotrwojtowicz/orgs","repos_url":"https://api.github.com/users/piotrwojtowicz/repos","events_url":"https://api.github.com/users/piotrwojtowicz/events{/privacy}","received_events_url":"https://api.github.com/users/piotrwojtowicz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-12T21:18:05Z","updated_at":"2015-05-09T16:14:52Z","closed_at":"2015-05-09T16:14:52Z","body":"I have noticed today something like bug when testing my app on tablet. \r\n\r\nI have a fragment with calendar, by default I have 3 days visible, and in onResume I have weekview.goToHour(8) - works ok everytime. I have also three menu items changing day count to 1, 3, 7, something like:\r\n\r\nif (id == R.id.action_schedule_7days) {\r\n            weekview.setNumberOfVisibleDays(7);\r\n            weekview.goToHour(8);\r\n}\r\n\r\nIt works ok on smartphone, but on tablet it throws me:\r\n\r\n04-12 22:24:07.944  19488-19488/com.x.y.z E/AndroidRuntime﹕ FATAL EXCEPTION: main\r\n    java.lang.IllegalArgumentException: Cannot scroll to an hour which will result the calendar to go off the screen.\r\n            at com.alamkanak.weekview.WeekView.goToHour(WeekView.java:1386)\r\n            at com.x.y.z.EmployeeScheduleFragment.onOptionsItemSelected(EmployeeScheduleFragment.java:337)\r\n            at android.support.v4.app.Fragment.performOptionsItemSelected(Fragment.java:1894)\r\n            at android.support.v4.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:2034)\r\n            at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:356)\r\n            at android.support.v7.app.ActionBarActivity.onMenuItemSelected(ActionBarActivity.java:155)\r\n            at android.support.v7.app.ActionBarActivityDelegate$1.onMenuItemSelected(ActionBarActivityDelegate.java:74)\r\n            at android.support.v7.app.ActionBarActivityDelegateBase.onMenuItemSelected(ActionBarActivityDelegateBase.java:556)\r\n            at android.support.v7.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:802)\r\n            at android.support.v7.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:153)\r\n            at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:949)\r\n            at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:939)\r\n            at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:596)\r\n            at android.support.v7.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:145)\r\n            at android.view.View.performClick(View.java:4222)\r\n            at android.view.View$PerformClick.run(View.java:17337)\r\n            at android.os.Handler.handleCallback(Handler.java:615)\r\n            at android.os.Handler.dispatchMessage(Handler.java:92)\r\n            at android.os.Looper.loop(Looper.java:137)\r\n            at android.app.ActivityThread.main(ActivityThread.java:4895)\r\n            at java.lang.reflect.Method.invokeNative(Native Method)\r\n            at java.lang.reflect.Method.invoke(Method.java:511)\r\n            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)\r\n            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)\r\n            at dalvik.system.NativeStart.main(Native Method)\r\n\r\nPS. some clues: when I have app:hourHeight=\"40dp\" then after goToHour(8) in onResume I see hours 8 till end and when calling again goToHour(8) error occurs. But if I change hourHeight to i.e. 60dp then after onResume I don't see last hours of day and when calling again goToHours(8) error doesn't occur. It's something like workaround but I have no guarantee that it will work always, second thing I can't allow my users to set their preferable hourHeight. \r\n\r\nAny clues guys? :)"},"comment":{"url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/comments/100511261","html_url":"https://github.com/alamkanak/Android-Week-View/issues/106#issuecomment-100511261","issue_url":"https://api.github.com/repos/alamkanak/Android-Week-View/issues/106","id":100511261,"user":{"login":"alamkanak","id":3194741,"avatar_url":"https://avatars.githubusercontent.com/u/3194741?v=3","gravatar_id":"","url":"https://api.github.com/users/alamkanak","html_url":"https://github.com/alamkanak","followers_url":"https://api.github.com/users/alamkanak/followers","following_url":"https://api.github.com/users/alamkanak/following{/other_user}","gists_url":"https://api.github.com/users/alamkanak/gists{/gist_id}","starred_url":"https://api.github.com/users/alamkanak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alamkanak/subscriptions","organizations_url":"https://api.github.com/users/alamkanak/orgs","repos_url":"https://api.github.com/users/alamkanak/repos","events_url":"https://api.github.com/users/alamkanak/events{/privacy}","received_events_url":"https://api.github.com/users/alamkanak/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T16:14:52Z","updated_at":"2015-05-09T16:14:52Z","body":"Fixed in v1.2.3"}}