Giter Site home page Giter Site logo

discretescrollviewindicator's People

Contributors

r-cohen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

neonguyen

discretescrollviewindicator's Issues

Indicator is not showing by adding this file

I have added this library. Data is displayed in horizontal way. I want to add circular indicator. For this I added DiscreteScrollViewIndicator file in our project and added piece of code which is required, but indicator is not shown.

// Java Code

        binding.picker.setOrientation(DSVOrientation.HORIZONTAL);
        infiniteAdapter = InfiniteScrollAdapter.wrap(adapter);

    binding.picker.setAdapter(infiniteAdapter);

    binding.picker.setItemTransitionTimeMillis(150);
    binding.picker.setItemTransformer(new ScaleTransformer.Builder()
            .setMinScale(0.8f)
            .build());

viewModel.getData();

    float DP = Resources.getSystem().getDisplayMetrics().density;
    DiscreteScrollViewIndicator pageIndicator = DiscreteScrollViewIndicator.Builder(binding.picker)
            .setColorActive(R.color.green_error)
            .setColorInactive((R.color.red_error))
            .setIndicatorStrokeWidth(4 * DP)
            .setIndicatorItemPadding(10 * DP)
            .align(DiscreteScrollViewIndicator.Alignment.PARENT_TOP)
            .matchParentWidth();
    binding.picker.addItemDecoration(pageIndicator);
    pageIndicator.setItemsCount(adapter.getItemCount());

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.