Created
          June 27, 2020 14:15 
        
      - 
      
- 
        Save gastsail/85d8c7bcd976a5408ab7a7ec298abdcf to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | val animalAdapter = AnimalAdapter(this) | |
| animalAdapter.setAnimals(mutableListOf(Animal("Dog","DogImgUrl"),Animal("Cat","CatImgUrl"),Animal("Hamster","HamsterImgUrl"),Animal("Shark","SharkImgUrl")) | |
| val breedAdapter = DogBreedAdapter(this) | |
| breedAdapter.setBreeds(mutableListOf(Breed("Bulldog"),Breed("Beagle"),Breed("Bulldog"),Breed("Golden retriever")) | |
| //Lets create now the ConcatAdapter with these adapters ready | |
| val concatAdapter = ConcatAdapter(animalAdapter,breedAdapter) | |
| animal_rv.layoutManager = LinearLayoutManager(requireContext()) | |
| animal_rv.adapter = concatAdapter | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment