Is it possible to load an image into a listview, where the path to the image is on a table?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I’m understanding correctly, it sounds like you want to display an image in a ListView using a table to control positioning, probably to do something along the lines of providing a description that accompanies the image. It’s definitely possible to use images in ListViews by leveraging a custom adapter.
Take a look at this example. I found it very helpful when I tried to do the same thing recently:
http://w2davids.wordpress.com/android-listview-with-iconsimages-and-sharks-with-lasers/
The only difference in your case is that you’ll want to create a view using TableLayout view elements while this example is using a LinearLayout (see country_listitem.xml).
You’ll want to make sure you create your custom view to handle the layout properties and a custom adapter to leverage that view and you’ll accomplish your goal.