Blog Details

img
Data Science

How do I Check If Recyclerview Is Empty

Spoke Right / 17 Nov, 2023

Recyclerview IS Empty

You should use RecyclerView in a situation where you want to show a lot of items, and the number of them is dynamic.

ListView should only be used when the number of items is always the same and is limited to the screen size.


if (recyclerview.getItemCount() == 0)
{
    Toast.makeText(getActivity(), "No records to show!", Toast.LENGTH_SHORT).show();
}

0 comments

Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0