{"action":"opened","issue":{"url":"https://api.github.com/repos/neokree/MaterialTabs/issues/37","labels_url":"https://api.github.com/repos/neokree/MaterialTabs/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/neokree/MaterialTabs/issues/37/comments","events_url":"https://api.github.com/repos/neokree/MaterialTabs/issues/37/events","html_url":"https://github.com/neokree/MaterialTabs/issues/37","id":57443187,"number":37,"title":"dynamic changing tabs is not working","user":{"login":"jjhesk","id":629338,"avatar_url":"https://avatars.githubusercontent.com/u/629338?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhesk","html_url":"https://github.com/jjhesk","followers_url":"https://api.github.com/users/jjhesk/followers","following_url":"https://api.github.com/users/jjhesk/following{/other_user}","gists_url":"https://api.github.com/users/jjhesk/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhesk/subscriptions","organizations_url":"https://api.github.com/users/jjhesk/orgs","repos_url":"https://api.github.com/users/jjhesk/repos","events_url":"https://api.github.com/users/jjhesk/events{/privacy}","received_events_url":"https://api.github.com/users/jjhesk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-12T10:36:42Z","updated_at":"2015-02-12T10:36:42Z","closed_at":null,"body":"I use program to dynamically change the tabs on the tab views but it does not show up in time.  As I have  used ```java\r\n mTab.postInvalidate();\r\n```\r\n and it does not work and it only shows when another new intent start and this intent does not finish. Then finish the new intent. After that the tabs will show up.\r\n\r\n\r\n```java\r\n private void initTabs() {\r\n        items_list.clear();\r\n        if (DataBank.filter_list_brand.size() > 0) items_list.add(\"Brand\");\r\n        if (DataBank.filter_list_cat.size() > 0) items_list.add(\"Category\");\r\n        if (DataBank.filter_list_size.size() > 0) items_list.add(\"Size\");\r\n        if (DataBank.filter_list_price.size() > 0) items_list.add(\"Price\");\r\n        for (int i = 0; i < items_list.size(); i++) {\r\n            String txt = items_list.get(i);\r\n            mTab.addTab(mTab.newTab().setTabListener(this).setText(txt));\r\n        }\r\n        Log.d(TAG, items_list.size() + \" completed request for top menu\");\r\n        Tool.trace(this, TAG + \"completed request for the top menu. there are : \" + items_list.size() + \" items\");\r\n        mTab.postInvalidate();\r\n    }\r\n```"}}