I want to create a journal that appears as a list in a ListView. The list should be able to have a text entry or an image for each row. Now, I have these entries (text and image) in a database. I just want to know how to create a list adapter which can have these entries. From the examples I have seen, the list adapters all have only one data type. I want my adapter to have data type image or text. Please Help! Been searching for 3 hours now.
            Asked
            
        
        
            Active
            
        
            Viewed 129 times
        
    0
            
            
         
    
    
        Andro Selva
        
- 53,910
- 52
- 193
- 240
 
    
    
        Ama
        
- 195
- 1
- 1
- 9
- 
                    Have you seen this ? http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview – Kartik Domadiya Jun 27 '11 at 09:18
1 Answers
0
            
            
        To show images in some listItems and text in others, declare both an ImageView and a TextView in the listitem xml, and hide/show one of them with View.setVisibility(...), where you bind the content. For examples of multiple children in a listItem, refer to other Nik's answer
 
    
    
        Marmoy
        
- 8,009
- 7
- 46
- 74