How to Implement Pagination in Android Using RecyclerView :


What is Pagination?

Pagination is to load data according to requirement rather than loading complete data at a time. So this helps to reduce the loading time for our data from our API as well as increase the performance of our application.


 

What is the benefit of using Pagination in your lists of data? 

Many times there is a situation when we have to load a huge amount of the data at a time in our list view or recycler view. So if we load all the data at a time it will take some time to load the data and this will increase the loading time of our Recycler View. Pagination will provide you support with the help of it we can load data in the form of chunks so this will prevent our recycler view from degrading its performance and loading of the data will be faster.

Step-1: Create Main Activity XML : code is given below>>>>>


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".BuyerActivity.BlogAllPostActivity">

    <RelativeLayout
        android:id="@+id/relativeLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorPrimary"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">


        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/search"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dimens_40dp"
            android:layout_marginStart="@dimen/margin_equal"
            android:layout_marginTop="@dimen/margin_equal"
            android:layout_marginEnd="@dimen/margin_equal"
            android:layout_marginBottom="@dimen/margin_equal"
            android:background="@color/white"
            android:drawableLeft="@drawable/search"
            android:fontFamily="@font/opensans_regular"
            android:gravity="left|center_vertical"
            android:paddingLeft="@dimen/margin_mediumLarge"
            android:text="@string/search_blog_post"
            android:textAllCaps="false"
            android:textColor="@color/searchBarHintColorDark">

        </androidx.appcompat.widget.AppCompatButton>

    </RelativeLayout>

    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/relativeLayout"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:id="@+id/swipe_refresh_layout">

        <androidx.core.widget.NestedScrollView
            android:id="@+id/nested_scroll_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                >
                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/blog_list_recycler"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/margin_equal"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="1.0"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/pagesContainer" />

               

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/trending_post_list_recycler"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/margin_equal"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/search_result_textview" />

              
            </LinearLayout>

        </androidx.core.widget.NestedScrollView>

    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>


</RelativeLayout>



Step-2: Create Main Activity java : code is given below>>>>>

public class MainActivity extends BaseActivity implements SwipeRefreshLayout.OnRefreshListener{

@BindView(R.id.blog_list_recycler)
RecyclerView blog_list_recycler;

@BindView(R.id.trending_post_list_recycler)
RecyclerView trending_post_list_recycler;

@BindView(R.id.swipe_refresh_layout)
SwipeRefreshLayout swipeRefresh;

BlogListWithPaginationAdapter blogListWithPaginationAdapter;
TrendingPostListWithPaginationAdapter trendingPostListWithPaginationAdapter;


NestedScrollView nestedScrollView;
private AppCompatButton search;
LinearLayoutManager layoutManager;

int PageSize = 20;
private int currentPage = PAGE_START;
private boolean isLastPage = false;
private int totalPage = 0;
private boolean isLoading = false;
int totalItem = 0;




@Override
protected void initViews() {


ButterKnife.bind(this);

nestedScrollView = findViewById(R.id.nested_scroll_view);
swipeRefresh.setOnRefreshListener(this);

search = findViewById(R.id.search);


loadAdd();





layoutManager = new LinearLayoutManager(currentActivity);
blog_list_recycler.setLayoutManager(layoutManager);

blogListWithPaginationAdapter = new BlogListWithPaginationAdapter(new ArrayList<>(), currentActivity);
blog_list_recycler.setAdapter(blogListWithPaginationAdapter);



layoutManager = new LinearLayoutManager(currentActivity);
trending_post_list_recycler.setLayoutManager(layoutManager);

trendingPostListWithPaginationAdapter = new TrendingPostListWithPaginationAdapter(new ArrayList<>(), currentActivity);
trending_post_list_recycler.setAdapter(trendingPostListWithPaginationAdapter);

trending_post_list_recycler.addItemDecoration(new SimpleDividerItemDecoration(this));





nestedScrollView.setOnScrollChangeListener(new PaginationListenerrr(layoutManager) {
@Override
protected void loadMoreItems() {
isLoading = true;
currentPage++;
doApiCall();
}

@Override
public boolean isLastPage() {
return isLastPage;
}

@Override
public boolean isLoading() {
return isLoading;
}
});

doApiCall();
}

@Override
protected void initContext() {
context=BlogAllPostActivity.this;
currentActivity=BlogAllPostActivity.this;

}

@Override
protected void initListners() {

}

@Override
protected boolean isActionBar() {
return true;
}

@Override
protected boolean isHomeButton() {
return true;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_blog_all_post);
}

@Override
public void onClick(View view) {

}

@Override
public void onAlertClicked(int alertType) {

}

@Override
public void onRefresh() {
currentPage = PAGE_START;
isLastPage = false;
blogListWithPaginationAdapter.clear();
trendingPostListWithPaginationAdapter.clear();
doApiCall();
}



private void doApiCall() {
if (Validator.getInstance().isNetworkAvailable(currentActivity)) {
String pageno = String.valueOf(currentPage);

String pagesize = String.valueOf(PageSize);


Call<Pass Model Class Here> call = RetrofitClient.getInstance()
.getApi().getAllPost(pageno, pagesize);

call.enqueue(new Callback<GetAllBlogResponseModel>() {
@Override
public void onResponse(Call<GetAllBlogResponseModel> call, Response<GetAllBlogResponseModel> response) {
if (response.isSuccessful()) {
swipeRefresh.setRefreshing(false);
pass Model class here responseModel = response.body();
String status = String.valueOf(responseModel.getStatus());
if (status.equals("1")) {


try {
totalItem = Integer.parseInt(responseModel.getTotalCount());
int result = totalItem / 20;
int remd = totalItem % 20;

if(remd > 0){
result++;
totalPage = result;
}else {
totalPage = result;
}
} catch (Exception e) {
e.printStackTrace();
}


new Handler().postDelayed(new Runnable() {
@Override
public void run() {
List<BlogListPostModel> blogListPostModelList = new ArrayList<>();
blogListPostModelList = responseModel.getBlogList();

List<BlogTraindingListPostModel> blogTraindingListPostModelListt = new ArrayList<>();



if (currentPage != PAGE_START) trendingPostListWithPaginationAdapter.removeLoading();
blogListWithPaginationAdapter.addItems(blogListPostModelList);
trendingPostListWithPaginationAdapter.addItems(blogTraindingListPostModelListt);
swipeRefresh.setRefreshing(false);


if (currentPage < totalPage) {

trendingPostListWithPaginationAdapter.addLoading();
} else {
List<BlogTraindingListPostModel> blogTraindingListPostModelList = new ArrayList<>();
blogTraindingListPostModelList = responseModel.getTrendingPost();
trendingPostListWithPaginationAdapter.addItems(blogTraindingListPostModelList);
isLastPage = true;
}
isLoading = false;
}
}, 1500);

} else if (status.equals("0")) {
swipeRefresh.setRefreshing(false);
Toast.makeText(currentActivity, Log.e("TAG", responseModel.toString()), Toast.LENGTH_SHORT).show();
}

} else if (response.code() == 401) {
swipeRefresh.setRefreshing(false);
Toast.makeText(currentActivity, "Your Session has been Expiered,Please Login Again..", Toast.LENGTH_SHORT).show();
} else if (response.code() == 500) {
swipeRefresh.setRefreshing(false);
Toast.makeText(currentActivity, "Server Error", Toast.LENGTH_SHORT).show();
} else {
swipeRefresh.setRefreshing(false);
Toast.makeText(currentActivity, "Failed to Retrieve Items..", Toast.LENGTH_SHORT).show();
}
}

@Override
public void onFailure(Call<GetAllBlogResponseModel> call, Throwable t) {
swipeRefresh.setRefreshing(false);
if (t instanceof SocketTimeoutException) {
cancelProgressDialog();
try {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(currentActivity);
dialogBuilder.setMessage("oops! it seems there is a slow network connection issue.");

dialogBuilder.setPositiveButton("OK", (dialog, which) -> {


dialog.dismiss();
}
);

dialogBuilder.setIcon(R.drawable.aajjo_logo_final);
dialogBuilder.setTitle("Network Connection.");

AlertDialog alertDialog = dialogBuilder.create();
alertDialog.show();
} catch (Exception e) {
e.printStackTrace();
}

} else {
cancelProgressDialog();
Toast.makeText(currentActivity, t.toString(), Toast.LENGTH_SHORT).show();

}
}
});
} else {
alert(currentActivity, getResources().getString(R.string.alert_message_no_network), getResources().getString(R.string.alert_message_no_network), getResources().getString(R.string.alert_ok_button_text_no_network), getResources().getString(R.string.alert_cancel_button_text_no_network), true, false, ALERT_TYPE_NO_NETWORK);
}
}
}
 Step-3 pagination Adapter code :BlogListWithPaginationAdapter

public class BlogListWithPaginationAdapter extends RecyclerView.Adapter<BaseViewHolder>{


private static final int VIEW_TYPE_LOADING = 0;
private static final int VIEW_TYPE_NORMAL = 1;
private boolean isLoaderVisible = false;


private List<BlogListPostModel> list;

private Context context;

public BlogListWithPaginationAdapter(List<BlogListPostModel> list, Context context) {
this.list = list;
this.context = context;
}

@NonNull
@Override
public BaseViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

switch (viewType) {
case VIEW_TYPE_NORMAL:
return new ViewHolder(
LayoutInflater.from(parent.getContext()).inflate(R.layout.blogproductlayout1, parent, false));
case VIEW_TYPE_LOADING:
return new ProgressHolder(
LayoutInflater.from(parent.getContext()).inflate(R.layout.item_loading, parent, false));
default:
return null;
}
}

@Override
public void onBindViewHolder(@NonNull BaseViewHolder holder, int position) {

holder.onBind(position);
}

@Override
public int getItemViewType(int position) {
if (isLoaderVisible) {
return position == list.size() - 1 ? VIEW_TYPE_LOADING : VIEW_TYPE_NORMAL;
} else {
return VIEW_TYPE_NORMAL;
}
}

@Override
public int getItemCount() {
return list == null ? 0 : list.size();
}

public void addItems(List<BlogListPostModel> postItems) {
list.addAll(postItems);
notifyDataSetChanged();
}

public void addLoading() {
isLoaderVisible = true;
list.add(new BlogListPostModel());
notifyItemInserted(list.size() - 1);
}

public void removeLoading() {
isLoaderVisible = false;
int position = list.size() - 1;
BlogListPostModel item = getItem(position);
if (item != null) {
list.remove(position);
notifyItemRemoved(position);
}
}

public void clear() {
list.clear();
notifyDataSetChanged();
}

BlogListPostModel getItem(int position) {
return list.get(position);
}

public class ViewHolder extends BaseViewHolder {

@BindView(R.id.BlogTitle)
TextView BlogTitle;
@BindView(R.id.iconImageView)
ImageView heztechIcon;
@BindView(R.id.BlogProductHezTech)
TextView BlogProductHezTech;
@BindView(R.id.BlogAuthor1)
TextView BlogAuthor1;
@BindView(R.id.BlogDate)
TextView BlogDate;
@BindView(R.id.BlogProductShortDescription)
TextView BlogProductShortDescription;

@BindView(R.id.titleImage)
ImageView blogImage;
@BindView(R.id.blogProfileImage)
ImageView blogProfileImage;

@BindView(R.id.card)
LinearLayout cardView;


ViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}

protected void clear() {

}

public void onBind(int position) {
super.onBind(position);
BlogListPostModel item = list.get(position);
BlogTitle.setText(item.getBlogTitle());
BlogAuthor1.setText(item.getBlogAuthor());
BlogDate.setText(item.getBlogDate());
BlogProductShortDescription.setText(item.getBlogShortDescription());

String chk=item.getProductName();
if(Strings.isNullOrEmpty(chk)){
heztechIcon.setVisibility(View.GONE);
}else {
heztechIcon.setVisibility(View.VISIBLE);
BlogProductHezTech.setText(item.getBlogTitle());
}



}
}

public class ProgressHolder extends BaseViewHolder {
ProgressHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}

@Override
protected void clear() {
}
}


}
 Step-4>>blogproductlayout1 Xml Code is Given Below :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
app:cardCornerRadius="@dimen/dimens_12dp"
android:layout_margin="@dimen/mar_six"
android:padding="@dimen/margin_equal"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<ImageView
android:id="@+id/titleImage"
android:layout_width="match_parent"
android:scaleType="fitXY"
android:layout_height="@dimen/dimens_150dp"
android:src="@drawable/twitter">

</ImageView>

<TextView
android:id="@+id/BlogTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_equal"
android:ellipsize="end"
android:maxLines="2"
android:text=""
android:textColor="@color/black"
android:textSize="@dimen/font_xlarge"
android:textStyle="bold">

</TextView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ImageView
android:id="@+id/iconImageView"
android:layout_width="@dimen/dimens_18dp"
android:layout_height="@dimen/dimens_18dp"
android:layout_marginLeft="@dimen/margin_equal"
android:scaleType="fitXY"
android:src="@drawable/hez_24"
app:tint="@color/colorPrimary">

</ImageView>

<TextView
android:id="@+id/BlogProductHezTech"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_equal"
android:text=""
android:textColor="@color/colorPrimary"
android:textSize="@dimen/font_medium">

</TextView>
</LinearLayout>

<LinearLayout
android:id="@+id/linearLayout13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_equal"
android:layout_marginTop="@dimen/margin_equal"
android:layout_marginEnd="@dimen/margin_equal"
android:orientation="horizontal">

<ImageView
android:id="@+id/blogProfileImage"
android:layout_width="@dimen/dimens_24dp"
android:layout_height="@dimen/dimens_24dp"
android:layout_marginLeft="@dimen/spacing_control_half"
android:src="@drawable/circle_24">
</ImageView>

<TextView
android:id="@+id/BlogAuthor1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_equal"
android:text=""
android:textColor="@color/black"
android:textSize="@dimen/font_medium">

</TextView>

<TextView
android:id="@+id/BlogDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginLeft="@dimen/padding_notify"
android:layout_weight="1"
android:gravity="end"
android:maxLength="10"
android:text=""
android:textSize="@dimen/font_medium">
</TextView>
</LinearLayout>

<TextView
android:id="@+id/BlogProductShortDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_equal"
android:layout_marginBottom="@dimen/mar_six"
android:ellipsize="end"
android:maxLines="4"
android:text=""
android:textSize="@dimen/font_medium">
</TextView>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
 Step-5 item_loading. XML code is Given Below :
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerInParent="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:indeterminateDrawable="@drawable/progress_bg"
android:progress="0"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_equal"
android:textStyle="bold"
android:layout_gravity="center"
android:text="@string/loading">

</TextView>
</LinearLayout>


</androidx.constraintlayout.widget.ConstraintLayout>
Step-6 pagination Adapter code :TrendingPostListWithPaginationAdapter

public class TrendingPostListWithPaginationAdapter extends RecyclerView.Adapter<BaseViewHolder>{


private static final int VIEW_TYPE_LOADING = 0;
private static final int VIEW_TYPE_NORMAL = 1;
private boolean isLoaderVisible = false;


private List<BlogTraindingListPostModel> list;

private Context context;

public TrendingPostListWithPaginationAdapter(List<BlogTraindingListPostModel> list, Context context) {
this.list = list;
this.context = context;


}

@NonNull
@Override
public BaseViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

switch (viewType) {
case VIEW_TYPE_NORMAL:
return new ViewHolder(
LayoutInflater.from(parent.getContext()).inflate(R.layout.blogproductlayout2, parent, false));
case VIEW_TYPE_LOADING:
return new ProgressHolder(
LayoutInflater.from(parent.getContext()).inflate(R.layout.item_loading, parent, false));
default:
return null;
}
}

@Override
public void onBindViewHolder(@NonNull BaseViewHolder holder, int position) {

holder.onBind(position);
}

@Override
public int getItemViewType(int position) {
if (isLoaderVisible) {
return position == list.size() - 1 ? VIEW_TYPE_LOADING : VIEW_TYPE_NORMAL;
} else {
return VIEW_TYPE_NORMAL;
}
}

@Override
public int getItemCount() {
return list == null ? 0 : list.size();
}

public void addItems(List<BlogTraindingListPostModel> postItems) {
list.addAll(postItems);
notifyDataSetChanged();
}

public void addLoading() {
isLoaderVisible = true;
list.add(new BlogTraindingListPostModel());
notifyItemInserted(list.size() - 1);
}

public void removeLoading() {
isLoaderVisible = false;
int position = list.size() - 1;
BlogTraindingListPostModel item = getItem(position);
if (item != null) {
list.remove(position);
notifyItemRemoved(position);
}
}

public void clear() {
list.clear();
notifyDataSetChanged();
}

BlogTraindingListPostModel getItem(int position) {
return list.get(position);
}

public class ViewHolder extends BaseViewHolder {

@BindView(R.id.BlogProductShortDescription)
TextView BlogTitle;

@BindView(R.id.productdateTextView)
TextView BlogDate;


@BindView(R.id.rank)
TextView rank;

@BindView(R.id.blogTitleImage)
ImageView blogImage;




ViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}

protected void clear() {

}

public void onBind(int position) {
super.onBind(position);
BlogTraindingListPostModel item = list.get(position);
BlogTitle.setText(item.getBlogTitle());

BlogDate.setText(item.getBlogDate());







itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {


}
});

rank.setText(String.valueOf(position+1));


}
}

public class ProgressHolder extends BaseViewHolder {
ProgressHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}

@Override
protected void clear() {
}
}


}
Step-7>>blogproductlayout2 Xml Code is Given Below :
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/card"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="@dimen/margin_foure"
app:cardCornerRadius="@dimen/margin_equal">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">


<RelativeLayout
android:layout_width="@dimen/dimens_120dp"
android:layout_height="@dimen/dimens_100dp">

<ImageView
android:id="@+id/blogTitleImage"
android:layout_width="@dimen/dimens_120dp"
android:layout_height="@dimen/dimens_100dp"
android:scaleType="fitXY"
android:src="@drawable/twitter">

</ImageView>

<TextView
android:id="@+id/rank"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/rank_background"
android:drawableLeft="@drawable/hez_24"
android:drawableTint="@color/white"
android:paddingLeft="@dimen/margin_equal"
android:paddingRight="@dimen/margin_msixteen"
android:text="1"
android:textColor="@color/white"
android:textSize="@dimen/font_large">

</TextView>

</RelativeLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="@dimen/margin_foure"
android:layout_marginRight="@dimen/margin_foure"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/BlogProductShortDescription"
android:layout_marginTop="@dimen/margin_equal"
android:text=""
android:ellipsize="end"
android:textSize="@dimen/font_large"
android:maxLines="3"
android:textColor="@color/black">

</TextView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/productdateTextView"
android:layout_marginBottom="@dimen/margin_equal"
android:maxLength="10"
android:layout_marginTop="@dimen/margin_equal"
android:text="">

</TextView>


</LinearLayout>


</LinearLayout>


</androidx.cardview.widget.CardView>
dependencies :
implementation "androidx.paging:paging-runtime:$paging_version"
def paging_version = "2.1.2"
implementation "com.jakewharton:butterknife:10.1.0"
annotationProcessor "com.jakewharton:butterknife-compiler:10.1.0"

Rajeshbhatt12

My name is Rajesh Bhatt. I am working as a senior android developer . I have created this blog for kotlin ,java and Android Development interview questions etc..

Previous Post Next Post