Am trying to load picture and text on the slider from firebase into `daimajia` slider , but nothing is showing , am using a `FirebaseRecyclerAdapter` , this is how am doing it in the method below :-.

**But i have alreday declared** 

```
sliderShow = (SliderLayout) findViewById(R.id.slider);

```

**in the `onCreate` method**

```
 public void GetAdverts()
    {

        FirebaseRecyclerAdapter<Advert,MainActivity.EventViewHolder> firebaseRecyclerAdapter_ = new FirebaseRecyclerAdapter<Advert, MainActivity.EventViewHolder>(Advert.class,
                R.layout.slider_image,
                MainActivity.EventViewHolder.class,
                mDatabase) {
            @Override
            protected void populateViewHolder(MainActivity.EventViewHolder viewHolder, final Advert model, final int position) {

            try{

                HashMap<String,String> url_maps = new HashMap<String, String>();
                List<Advert> itemlist = new ArrayList<>();

                url_maps.put(model.getTitle(), model.getImageAdvert());

                for(String name : url_maps.keySet()){
                    TextSliderView textSliderView = new TextSliderView(getApplicationContext());
                    // initialize a SliderLayout
                    textSliderView
                            .description(name)
                            .image(url_maps.get(name));
                    //add your extra information
                    textSliderView.bundle(new Bundle());
                    textSliderView.getBundle()
                            .putString("extra",name);
                    textSliderView.setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {
                        @Override
                        public void onSliderClick(BaseSliderView slider) {

                            Toast.makeText(getApplicationContext(),
                                    "News Details ",Toast.LENGTH_LONG).show();
                        }
                    });

                    sliderShow.addSlider(textSliderView);
                }

                //   sliderShow.addSlider(textSliderView);
                sliderShow.setPresetTransformer(SliderLayout.Transformer.Accordion);
                sliderShow.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
                sliderShow.setCustomAnimation(new DescriptionAnimation());
                sliderShow.setDuration(10000);

            }
            catch (Exception e){

                e.printStackTrace();
            }

            }
        };

    }

```

where am i wrong please. 

**My Updated code.**

```
 void Slider(){

    mDatabase.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {

            Map<String, Advert> td = new HashMap<String, Advert>();

            HashMap<String,String> url_maps = new HashMap<String, String>();        

            ArrayList<Advert> values = new ArrayList<>(td.values());

           // List<String> keys = new ArrayList<String>(td.keySet());

            for (Advert ad: values) {

              //  Toast.makeText(getApplicationContext(),""+ad.getImageAdvert(),Toast.LENGTH_LONG).show();
                url_maps.put(ad.getTitle(),ad.getImageAdvert());

            }

            for(String name : url_maps.keySet()){
                TextSliderView textSliderView = new TextSliderView(getApplicationContext());
                // initialize a SliderLayout
                textSliderView
                        .description(name)
                        .image(url_maps.get(name));
                //add your extra information
                textSliderView.bundle(new Bundle());
                textSliderView.getBundle()
                        .putString("extra",name);
                textSliderView.setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {
                    @Override
                    public void onSliderClick(BaseSliderView slider) {

                        Toast.makeText(getApplicationContext(),
                                "Advertise Here ",Toast.LENGTH_LONG).show();
                    }
                });

                sliderShow.addSlider(textSliderView);
            }

            //   sliderShow.addSlider(textSliderView);
            sliderShow.setPresetTransformer(SliderLayout.Transformer.Accordion);
            sliderShow.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
            sliderShow.setCustomAnimation(new DescriptionAnimation());
            sliderShow.setDuration(10000);

        }

        @Override
        public void onCancelled(DatabaseError databaseError) {

        }
    });

    sliderShow = (SliderLayout) findViewById(R.id.slider);
}

```

**My Advert Class.**

```
public class Advert {

public String ImageAdvert;
public String  Title;

public Advert() {

    // left out for firebase ...

}

public String getImageAdvert() {
    return ImageAdvert;
}

public void setImageAdvert(String imageAdvert) {
    ImageAdvert = imageAdvert;
}

public String getTitle() {
    return Title;
}

public void setTitle(String title) {
    Title = title;
}
}

```