{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/4246","repository_url":"https://api.github.com/repos/realm/realm-java","labels_url":"https://api.github.com/repos/realm/realm-java/issues/4246/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/4246/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/4246/events","html_url":"https://github.com/realm/realm-java/issues/4246","id":210021829,"number":4246,"title":"RealmBasedRecyclerViewAdapter is not recycling views/refreshing when adding to list","user":{"login":"Muddz","id":14817640,"avatar_url":"https://avatars.githubusercontent.com/u/14817640?v=3","gravatar_id":"","url":"https://api.github.com/users/Muddz","html_url":"https://github.com/Muddz","followers_url":"https://api.github.com/users/Muddz/followers","following_url":"https://api.github.com/users/Muddz/following{/other_user}","gists_url":"https://api.github.com/users/Muddz/gists{/gist_id}","starred_url":"https://api.github.com/users/Muddz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Muddz/subscriptions","organizations_url":"https://api.github.com/users/Muddz/orgs","repos_url":"https://api.github.com/users/Muddz/repos","events_url":"https://api.github.com/users/Muddz/events{/privacy}","received_events_url":"https://api.github.com/users/Muddz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-02-24T11:12:13Z","updated_at":"2017-02-24T17:58:50Z","closed_at":null,"body":" I have a list that I can add items into, but the the inserted items do not show right away! I have to restart the app to see the changes. This is how I have implemented the Realm adapter for my Realm Recyclerview. \r\n\r\n\r\n\r\n    public class RealmlistAdapter extends RealmBasedRecyclerViewAdapter<ListItem, RealmlistAdapter.Viewholder> {\r\n\r\n    private String valutaSign;\r\n    private RealmResults<ListItem> realmResults;\r\n\r\n    public RealmlistAdapter(Context context, RealmResults<ListItem> realmResults, String valutaSign) {\r\n        super(context, realmResults, true, false);\r\n        this.valutaSign = valutaSign;\r\n        this.realmResults = realmResults;\r\n    }\r\n\r\n\r\n    public void setValutaSign(String valutaSign) {\r\n        this.valutaSign = valutaSign;\r\n        notifyDataSetChanged();\r\n    }\r\n\r\n    \r\n\r\n\r\n    @Override\r\n    public Viewholder onCreateRealmViewHolder(ViewGroup viewGroup, int i) {\r\n        View rootView = inflater.inflate(R.layout.item_product, viewGroup, false);\r\n        return new Viewholder(rootView);\r\n    }\r\n\r\n    @Override\r\n    public void onBindRealmViewHolder(Viewholder viewholder, int i) {\r\n\r\n        final ListItem listItem = realmResults.get(i);\r\n\r\n\r\n        viewholder.title.setText(listItem.getTitle());\r\n        viewholder.title2.setText(listItem.getLocation() + \" \" + Utils.getFormattedPrice(listItem.getPrice()) + \" \" + valutaSign);\r\n        viewholder.checkBox.setChecked(listItem.getIsBought() == 1);\r\n    }\r\n\r\n\r\n\r\n\r\n\r\n    public static class Viewholder extends io.realm.RealmViewHolder {\r\n\r\n        @BindView(R.id.item_list_textview1)\r\n        TextView title;\r\n        @BindView(R.id.item_list_textview2)\r\n        TextView title2;\r\n        @BindView(R.id.item_list_checkbox)\r\n        CheckBox checkBox;\r\n        @BindView(R.id.item_list_menuBtn)\r\n        ImageButton imageButton;\r\n\r\n        public Viewholder(View itemView) {\r\n            super(itemView);\r\n            ButterKnife.bind(this, itemView);\r\n\r\n        }\r\n    }\r\n\r\n    }\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/282359290","html_url":"https://github.com/realm/realm-java/issues/4246#issuecomment-282359290","issue_url":"https://api.github.com/repos/realm/realm-java/issues/4246","id":282359290,"user":{"login":"Muddz","id":14817640,"avatar_url":"https://avatars.githubusercontent.com/u/14817640?v=3","gravatar_id":"","url":"https://api.github.com/users/Muddz","html_url":"https://github.com/Muddz","followers_url":"https://api.github.com/users/Muddz/followers","following_url":"https://api.github.com/users/Muddz/following{/other_user}","gists_url":"https://api.github.com/users/Muddz/gists{/gist_id}","starred_url":"https://api.github.com/users/Muddz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Muddz/subscriptions","organizations_url":"https://api.github.com/users/Muddz/orgs","repos_url":"https://api.github.com/users/Muddz/repos","events_url":"https://api.github.com/users/Muddz/events{/privacy}","received_events_url":"https://api.github.com/users/Muddz/received_events","type":"User","site_admin":false},"created_at":"2017-02-24T17:58:50Z","updated_at":"2017-02-24T17:58:50Z","body":"@Zhuinden aaah I was of the impression that it was, from a tutorial I read!\r\n\r\nThanks I will implement the officiel one"}}
{"actor":{"display_login":"Muddz"}}