Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shows blank screen when implemented in fragment. #414

Open
MaC-See opened this issue Aug 3, 2019 · 0 comments
Open

Shows blank screen when implemented in fragment. #414

MaC-See opened this issue Aug 3, 2019 · 0 comments

Comments

@MaC-See
Copy link

MaC-See commented Aug 3, 2019

Shows blank screen when implemented in fragment.

mDemoSlider = view.findViewById(R.id.slider);

    HashMap<String, Integer> imagesWithTitle = new HashMap<>();
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);
    imagesWithTitle.put("xxxx", R.drawable.xxxx);

    for (String name : imagesWithTitle.keySet()) {
        TextSliderView textSliderView = new TextSliderView(getContext());
        // initialize a SliderLayout
        textSliderView
                .description(name)
                .image(imagesWithTitle.get(name))
                .setScaleType(BaseSliderView.ScaleType.Fit);
        //.setOnSliderClickListener(HomeFragment.this);

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

        mDemoSlider.addSlider(textSliderView);
    }

    mDemoSlider.setPresetTransformer(SliderLayout.Transformer.Accordion);
    mDemoSlider.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
    mDemoSlider.setCustomAnimation(new DescriptionAnimation());
    mDemoSlider.setDuration(4000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant