{"action":"created","issue":{"url":"https://api.github.com/repos/81813780/HandyTabBar/issues/1","labels_url":"https://api.github.com/repos/81813780/HandyTabBar/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/81813780/HandyTabBar/issues/1/comments","events_url":"https://api.github.com/repos/81813780/HandyTabBar/issues/1/events","html_url":"https://github.com/81813780/HandyTabBar/issues/1","id":58102289,"number":1,"title":"onTabState called with only selected position","user":{"login":"BSnaxx","id":5686302,"avatar_url":"https://avatars.githubusercontent.com/u/5686302?v=3","gravatar_id":"","url":"https://api.github.com/users/BSnaxx","html_url":"https://github.com/BSnaxx","followers_url":"https://api.github.com/users/BSnaxx/followers","following_url":"https://api.github.com/users/BSnaxx/following{/other_user}","gists_url":"https://api.github.com/users/BSnaxx/gists{/gist_id}","starred_url":"https://api.github.com/users/BSnaxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BSnaxx/subscriptions","organizations_url":"https://api.github.com/users/BSnaxx/orgs","repos_url":"https://api.github.com/users/BSnaxx/repos","events_url":"https://api.github.com/users/BSnaxx/events{/privacy}","received_events_url":"https://api.github.com/users/BSnaxx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-18T17:49:19Z","updated_at":"2015-02-25T02:10:17Z","closed_at":null,"body":"In my implementation, I see onTabState called 4 times, for my 4 tabs, except that the position argument is the same for all 4. If you look around line 227 of HandyTabBar.java:\r\n\r\n    private void setActiveTab(int position) {\r\n        for (int i = 0; i < tabCount; i++) {\r\n            View v = mTabsContainer.getChildAt(i);\r\n            boolean isSelected=false;\r\n            if (position==i){\r\n                isSelected=true;\r\n            }\r\n            mTabLayout.onTabState(v,isSelected,position);\r\n        }\r\n    }\r\n\r\nShouldn't it be:             mTabLayout.onTabState(v,isSelected,i);"},"comment":{"url":"https://api.github.com/repos/81813780/HandyTabBar/issues/comments/75892452","html_url":"https://github.com/81813780/HandyTabBar/issues/1#issuecomment-75892452","issue_url":"https://api.github.com/repos/81813780/HandyTabBar/issues/1","id":75892452,"user":{"login":"81813780","id":2297803,"avatar_url":"https://avatars.githubusercontent.com/u/2297803?v=3","gravatar_id":"","url":"https://api.github.com/users/81813780","html_url":"https://github.com/81813780","followers_url":"https://api.github.com/users/81813780/followers","following_url":"https://api.github.com/users/81813780/following{/other_user}","gists_url":"https://api.github.com/users/81813780/gists{/gist_id}","starred_url":"https://api.github.com/users/81813780/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/81813780/subscriptions","organizations_url":"https://api.github.com/users/81813780/orgs","repos_url":"https://api.github.com/users/81813780/repos","events_url":"https://api.github.com/users/81813780/events{/privacy}","received_events_url":"https://api.github.com/users/81813780/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T02:10:17Z","updated_at":"2015-02-25T02:10:17Z","body":"you are right ,onTabState should't called 4 times , I will solve this soon, And Welcome BSnaxx . Submit a Pull Request If you are done editing the code"}}