Git Product home page Git Product logo

mindinventory / autoscrollcircularpagerview Goto Github PK

View Code? Open in Web Editor NEW
17.0 10.0 4.0 844 KB

AutoScrollCircularPagerView is a library to show a slider with features of the circular auto-scroll with configurable.

Home Page: https://www.mindinventory.com/android-application-development.php

License: MIT License

Kotlin 100.00%
autoscroll viewpager recyclerview autoscrollviewpager autoscrollrecyclerview circular circularviewpager android kotlin autoscrolpager

autoscrollcircularpagerview's Introduction

AutoScrollCircularPagerView

AutoScrollCircularPagerView is a library to show slider with features of circular auto scroll with configurable

image

Key features

  • Circular image slider
  • Easy to customise auto scroll time interval
  • Configurable dots position and colors

Usage

Dependencies

  • Step 1. Add the JitPack repository to your build file

    Add it in your root build.gradle at the end of repositories:

        allprojects {
    	    repositories {
    		    ...
    		    maven { url 'https://jitpack.io' }
    	    }
        }
  • Step 2. Add the dependency

    Add it in your app module build.gradle:

        dependencies {
            ...
            implementation 'com.github.Mindinventory:AutoScrollCircularPagerView:0.0.2'
        }

Implementation

  • Step 1. Add AutoScrollCircularPagerView in to your layout class:

            <com.mindinventory.AutoScrollCircularPagerView
                    android:id="@+id/autoScrollContainer"
                    android:layout_width="0dp"
                    android:layout_height="200dp"
                    android:orientation="horizontal"
                    app:auto_scroll_delay="5000"
                    app:dot_margin="20dp"
                    app:dot_gravity="bottom"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:selected_dot_color="@color/selected_color"
                    app:unselected_dot_color="@color/unselected_color" />
  • Step 2. Setup adapter and items for AutoScrollCircularPagerView in to your Activity or Fragment:

    class MainActivity : AppCompatActivity() {
        private val images = ArrayList<Int>().apply {
            add(R.drawable.image1)
            add(R.drawable.image2)
            add(R.drawable.image3)
            add(R.drawable.image4)
            add(R.drawable.image5)
        }
        private val myAdapter by lazy { MyAdapter() }
    
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            setContentView(R.layout.activity_main)
            autoScrollContainer.setAdapter(myAdapter)
            autoScrollContainer.setItems(images)
        }
    }

Guideline for contributors

Contribution towards our repository is always welcome, we request contributors to create a pull request to the develop branch only.

Guideline to report an issue/feature request

It would be great for us if the reporter can share the below things to understand the root cause of the issue.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue

Requirements

  • minSdkVersion >= 23
  • Androidx

LICENSE!

AutoScrollCircularPagerView is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding our work.

autoscrollcircularpagerview's People

Contributors

akashmi avatar chiragmi avatar malikmotani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoscrollcircularpagerview's Issues

Issue in position

If my array size is 3 then the adapter picks the last position instead of the 0 position

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.