I need to create a frame for an item in a listView but I have no idea how to do this
It is now recommended to use the RecyclerView or CardView instead of ListView , but if you still need to make use of ListView which in this case will have custom layout, see the Android documentation on Adapter for ListView . One possibility would be to extend BaseAdapter .
Basically, you would use View where your list will get a conventional ListView and would create an adapter in Java with the specifics of your ListView including the layout and methods of what should happen when you press an item in the list or press for a longer time.
In the ListView related activity, create an adapter object and use the setAdapter (ListAdapter l) method to link your custom adapter to ListView .
You can check out here for an example.
If you want to customize the ListView, I recommend this tutorial there:
They explain everything right! I hope I have helped!