I am still unclear about which adapter to use in a situation that doesn’t require the basic, SimpleAdapter. There are BaseAdapters, ArrayAdapters, CustomAdapters, etc.
I would like to make a ListView with a simple layout like seen in the comment section in the Google PlayStore. A TextView on one side, and an image that pops up a context menu of some sort.
What adapter would I use for this that would work best?
In your case it is easier to use a
SimpleAdapter. Just provide your custom layout and connect the data with the widgets’ id. Something similar to this:Do not forget to identify the layout’s TextView and ImageView as
"@+id/txt"and"@+id/img"respectively.(If your image is always the same, just set it in the layout and forget linking the
R.id.imgpart)