0
Today it is recommended the use of Recyclerview or Cardview in place of Listview, but if still, if you need to make use of the Listview which in case will have customized layout, see the Android documentation on Adapter for Listview. One possibility would be to extend Basedapter.
Basically, you would use View where your list will be Listview and create an adapter in Java with the specifics of your Listview, including the layout and methods of what should occur when pressing a list item or pressing for a longer time.
Already in the activity related to Listview, create an Adapter object and make use of the method setAdapter(Listidapter l) to link your custom adapter to Listview.
You can check out here an example.
You can use Cardview to achieve this kind of effect.
– Leonardo Lima