I would suggest you to use recycler view instead of ListView
Recycler view comes with more decoration and methods which will definitely help you.
Have a look to offical docs page
RecyclerView | Android Developers[
^]
And there is a know issue with recycler view when scrolling
It shuffles the item when scroll. When i was beginner it took me several hours to find its issue.
There are multiple solutions to it You can do if else conditions but it is not recommended you need to override Recyclerview two methods
getItemId() and getITemViewType And this will solve your problem
Solution reference:
On Scrolling, Recyclerview shuffles or change values on list item | Solution Spirit[
^]