I am trying to add a ListView on my DialogFragment, but I am getting the following error:
            Asked
            
        
        
            Active
            
        
            Viewed 111 times
        
    2 Answers
1
            
            
        You are inside a fragment so you need to use the fragments Activity property.
 
    
    
        tequila slammer
        
- 2,821
- 1
- 18
- 25
1
            You are inside a DialogFragment and you're trying to pass it as the first argument of your Adapter. It, however, expects a Context instead of a fragment, hence the error. 
You should replace the this in your Adapter's constructor with Activity, the property of your adapter that contains and Activiy (which is a Context)
 
    
    
        Community
        
- 1
- 1
 
    
    
        William Barbosa
        
- 4,936
- 2
- 19
- 37

