The Developer World Is Yours

The best place for Magento & Android tips and tricks… and much more!

The Developer World Is Yours

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Corner of knowledge
  • Android
  • PHP
  • Magento Wiki
  • Javascript
  • About us

Tag Archives: Add

Add item recyclerView

Posted on May 8, 2017 by Cabezas
Reply

Add item recyclerView

When We add a item in our recyclerView, first step is in our adapter We must to add this:

void addItem(VerticalData dataObj, int index) {
        mDataset.add(dataObj);
        notifyItemInserted(index);
    }

And now our fragment or activity we call the method like this:

mAdapter.addItem(object, mAdapter.getItemCount());

Example in GitHub

Posted in Android | Tagged Add, android, item, recyclerview | Leave a reply

Recent Posts

  • How to do clickable jetpack compose list
  • How to do single choice in jetpack compose list
  • Multiple choices in a list with compose
  • How to use GraphQL with Retrofit on Android?
  • Dagger in kotlin

Categories

  • Android
  • Javascript
  • jQuery
  • Kotlin Android
  • Magento
  • Magento 2
  • PHP
  • Python
  • Ubuntu & Linux
Proudly powered by Javier Ch & Javier Gc
Do you like unicorn stuff? If so, check out this trendy article about how to draw a unicorn.
We use cookies. OK Read More
Privacy & Cookies Policy