Let’s Add Products in Android for E-Commerce App
Dependencies

To build our application successfully, we need the following dependencies

Recycler View

Card View

Retrofit

Gson converter

Glide

Copy-paste the dependencies given in the below blocks in the app level gradle file and click sync now on the top right corner of the IDE to get all the dependencies.

Recycler View makes it easy to efficiently display large sets of data. We supply the data and define how each item looks, and the Recycler View library dynamically creates the elements when they’re needed. As the name implies, Recycler View recycles those individual elements.

implementation ‘androidx.recyclerview:recyclerview:1.1.0’

Card View is gonna act as the basic building block element for our Recycler View. The Card View contents will be decided by us and the same block of elements will be repeating in our Recycler View.

implementation 'androidx.cardview:cardview:1.0.0'

Retrofit is the REST API client that can send requests and receive response from our RESTful service. Gson converter is used to send and receive data as JSON (JavaScript Object Notation).

implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

With Glide, you can load and display media from many different sources, such as remote servers or the local file system. This dependency is to display the image of a product with its URL.

implementation 'com.github.bumptech.glide:glide:4.11.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

Now we have added all the required dependencies for the product.
['Nil Madhab']
['Ecommerce Web Development', 'Android', 'Technology Hits', 'AndroidDev', 'Mobile App Development']