{"action":"created","issue":{"url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/55","repository_url":"https://api.github.com/repos/davideas/FlexibleAdapter","labels_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/55/comments","events_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/55/events","html_url":"https://github.com/davideas/FlexibleAdapter/issues/55","id":141506251,"number":55,"title":"How to enable sticky headers?","user":{"login":"BoldijarPaul","id":7826299,"avatar_url":"https://avatars.githubusercontent.com/u/7826299?v=3","gravatar_id":"","url":"https://api.github.com/users/BoldijarPaul","html_url":"https://github.com/BoldijarPaul","followers_url":"https://api.github.com/users/BoldijarPaul/followers","following_url":"https://api.github.com/users/BoldijarPaul/following{/other_user}","gists_url":"https://api.github.com/users/BoldijarPaul/gists{/gist_id}","starred_url":"https://api.github.com/users/BoldijarPaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoldijarPaul/subscriptions","organizations_url":"https://api.github.com/users/BoldijarPaul/orgs","repos_url":"https://api.github.com/users/BoldijarPaul/repos","events_url":"https://api.github.com/users/BoldijarPaul/events{/privacy}","received_events_url":"https://api.github.com/users/BoldijarPaul/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-17T07:55:43Z","updated_at":"2016-03-17T16:50:39Z","closed_at":"2016-03-17T09:17:51Z","body":"My header model\r\n\r\n` */\r\npublic class MyNewsBigItem extends AbstractFlexibleItem<MyNewsBigItem.ViewHolder> implements ISectionable<MyNewsBigItem.ViewHolder, MyNewsHeaderItem> {\r\n\r\n    private MyNewsHeaderItem mHeader;\r\n\r\n    @Override\r\n    public MyNewsHeaderItem getHeader() {\r\n        return mHeader;\r\n    }\r\n\r\n    @Override\r\n    public MyNewsHeaderItem setHeader(MyNewsHeaderItem header) {\r\n        mHeader = header;\r\n        return header;\r\n    }\r\n`\r\nAnd my adapter looks like this:\r\n\r\n`public class MyNewsFlexibleAdapter extends FlexibleAdapter<AbstractFlexibleItem> {\r\n\r\n    public MyNewsFlexibleAdapter(List<AbstractFlexibleItem> items) {\r\n        super(items);\r\n        enableStickyHeaders(3);\r\n        MyNewsHeaderItem h1 = createHeaderItem();\r\n        MyNewsHeaderItem h2 = createHeaderItem();\r\n        MyNewsHeaderItem h3 = createHeaderItem();\r\n        MyNewsHeaderItem h4 = createHeaderItem();\r\n\r\n        addItem(getItemCount(), h1);\r\n        addItem(getItemCount(), createbigItem(h1));\r\n        addItem(getItemCount(), createbigItem(h1));\r\n        addItem(getItemCount(), createbigItem(h1));\r\n        addItem(getItemCount(), createbigItem(h1));\r\n        addItem(getItemCount(), h2);\r\n        addItem(getItemCount(), createbigItem(h2));\r\n        addItem(getItemCount(), createbigItem(h2));\r\n        addItem(getItemCount(), createbigItem(h2));\r\n        addItem(getItemCount(), createbigItem(h2));\r\n        addItem(getItemCount(), createbigItem(h2));\r\n        addItem(getItemCount(), h3);\r\n        addItem(getItemCount(), createbigItem(h3));\r\n        addItem(getItemCount(), h4);\r\n        addItem(getItemCount(), createbigItem(h4));\r\n        addItem(getItemCount(), createbigItem(h4));\r\n        addItem(getItemCount(), createbigItem(h4));\r\n        addItem(getItemCount(), createbigItem(h4));\r\n    }\r\n`\r\n\r\nEverything is shown correctly on the app, but the headers are not sticky. Where I'm wrong?\r\nI've also tried to call the enableStickyHeaders after I set the adapter to the recyclerview. no success."},"comment":{"url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/comments/197970787","html_url":"https://github.com/davideas/FlexibleAdapter/issues/55#issuecomment-197970787","issue_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/55","id":197970787,"user":{"login":"davideas","id":12213847,"avatar_url":"https://avatars.githubusercontent.com/u/12213847?v=3","gravatar_id":"","url":"https://api.github.com/users/davideas","html_url":"https://github.com/davideas","followers_url":"https://api.github.com/users/davideas/followers","following_url":"https://api.github.com/users/davideas/following{/other_user}","gists_url":"https://api.github.com/users/davideas/gists{/gist_id}","starred_url":"https://api.github.com/users/davideas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davideas/subscriptions","organizations_url":"https://api.github.com/users/davideas/orgs","repos_url":"https://api.github.com/users/davideas/repos","events_url":"https://api.github.com/users/davideas/events{/privacy}","received_events_url":"https://api.github.com/users/davideas/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T16:50:39Z","updated_at":"2016-03-17T16:50:39Z","body":"Items are not aware of the adapter, that flag is used internally especially during the filter, so if you want hide an item, basically you want to remove that item from the adapter but not from your database. You should have a logic behind to not add these hidden items list once you change that flag.\r\nI hope I've answered your question."}}