android - Animations not working on my RecyclerView -


i trying item animations working on recyclerview. animations meant using standard defaultitemanimator, , recyclerview showing run-of-the-mill list of cardviews. unfortunately have been unable animations show @ all. code included below, without errors in logcat, hard me pinpoint origin of fault. please ask more info if needed.

in fragment have:

@override public view oncreateview(layoutinflater inflater, viewgroup container,                          bundle savedinstancestate) {     view layout = inflater.inflate(r.layout.fragment_main, container, false);      mrecyclerview = (recyclerview)layout.findviewbyid(r.id.my_recycler_view);     mrecyclerview.sethasfixedsize(true);      mrvlayoutmanager = new linearlayoutmanager(getactivity());     mrecyclerview.setlayoutmanager(mrvlayoutmanager);      // cursor swapped adapter when loader it's job     mcursoradapter = new rationcursoradapter( null );     mrecyclerview.setadapter(mcursoradapter);      /////////     // should work right?!     mrecyclerview.setitemanimator(new defaultitemanimator());     /////////      return layout; } 

the recyclerview displays list intended, , far can tell running smoothly , properly, animations never show.

items added via contentprovider

contentresolver resolver = getcontentresolver(); resolver.insert(datacontract.entry.content_uri, content_values); 

which looks this:

@override public uri insert(uri uri, contentvalues values) {     if( urimatcher.match(uri) == entry_uri ){         sqlitedatabase db = dbhelper.getwritabledatabase();         long id = db.insert(             datacontract.entry.table_name,             null,             values         );          if(id != -1 ){              // inserted             getcontext().getcontentresolver().notifychange( uri, null );             return datacontract.entry.buildentryuri(id);         }         // problem inserting         throw new sqlexception("error inserting database uri " + uri);     }      throw new illegalargumentexception("inserting not supported uri " + uri); } 

i running on nexus phone running android 5.1

any ideas on how working? thanks.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -