So RecyclerView was introduced to replace List view and it's optimized to reuse existing views and so it's faster and more efficient as stated in the documentation:
While using it, I faced the issue of missing a useful functionality that is implemented in ListView.
that feature is setting an empty view in case there was no records.
In ListView it was as simple as this
View emptyView = findViewById(R.id.mylist_empty_view);
ListView myList = ....
but this method doesn't exist for recycler view so we need a work around until android team fixes this.
and here are the screen shots of both list view and recycler view fix
List view :
Recycler view :
here is how I fixed it:
here is the content of empty_view, it can be anything.
istio archeticture (source istio.io) I would like to share with you a sample repo to start and help you continue your jou...
In this post I'll explain the required work to create a rest API utilizing both spring and hibernate version 4, and the configuration wi...
So RecyclerView was introduced to replace List view and it's optimized to reuse existing views and so it's faster and more efficient...
In the previous part we finished the dashboard read functionality, now we want to add the skeleton for other pages: - Login In this p...