AndroidImageSlider icon indicating copy to clipboard operation
AndroidImageSlider copied to clipboard

How to get current position of image slide??

Open pnilkanth12 opened this issue 6 years ago • 1 comments

I want to click slider to open current image of slider so how to do open current slide image full screen

pnilkanth12 avatar Jan 04 '19 11:01 pnilkanth12

You can send a image id and send it to another Activity or Fregment and open image by image id number.

for (HashMap<String, String> name : listarray) { textSliderView = new TextSliderView(getActivity());

                // initialize a SliderLayout
                textSliderView
                        .description(name.get("slider_title"))
                        .image(name.get("slider_image"))
                        .setScaleType(BaseSliderView.ScaleType.Fit)
                        .setOnSliderClickListener(this);
                ;

                //add your extra information
                textSliderView.bundle(new Bundle());
                textSliderView.getBundle()
                        .putString("extra", name.get("slider_title"));

                imgSlider.addSlider(textSliderView);
            }

        } catch (JSONException e) {


        }
    }

    @Override
    public void onSliderClick(BaseSliderView slider) {
       Toast.makeText(getActivity(),slider.getBundle().get("extra") + "",Toast.LENGTH_SHORT).show();


    }

hosein1366 avatar Jan 04 '19 20:01 hosein1366