ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - DanielMartinus/Stepper-Touch: Stepper Touch for Android based on MaterialUp submission
Stepper Touch for Android based on MaterialUp submission - DanielMartinus/Stepper-Touch
Visit Site

GitHub - DanielMartinus/Stepper-Touch: Stepper Touch for Android based on MaterialUp submission

GitHub - DanielMartinus/Stepper-Touch: Stepper Touch for Android based on MaterialUp submission

⚠️ This repository is no longer maintained

Stepper-Touch

Twitter API Awesome Kotlin Badge CircleCI

For more updates on this and other open-source projects, follow me on twitter 👉 here


Stepper Touch for Android based on a Material Up showcase designed by Oleg Frolov

In the latest version of the support library (25.3.0) a new class SpringAnimation was made available. I wanted to test this out and not long after that I found Stepper Touch, a concept made in FramerJS, on Material Up. I took this oppertunity to play with SpringAnimations.

Try it yourself:

Gradle

  • Step 1. Add the JitPack repository to your build file
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  • Step 2. Add the dependency (only for androidx projects)
dependencies {
    implementation 'com.github.DanielMartinus:Stepper-Touch:1.0.1'
}

If you haven't migrated your project to AndroidX use:

dependencies {
    implementation 'com.github.DanielMartinus:Stepper-Touch:0.6'
}

More info about it here: #24

Implement

<nl.dionsegijn.steppertouch.StepperTouch
        android:id="@+id/stepperTouch"
        android:layout_width="100dp"
        android:layout_height="40dp" />

Kotlin

val stepperTouch = findViewById<StepperTouch>(R.id.stepperTouch)
stepperTouch.minValue = 0
stepperTouch.minValue = 10
stepperTouch.sideTapEnabled = true
stepperTouch.addStepCallback(object : OnStepCallback {
	override fun onStep(value: Int, positive: Boolean) {
    		Toast.makeText(applicationContext, value.toString(), Toast.LENGTH_SHORT).show()
	}
})

Java

StepperTouch stepperTouch = findViewById(R.id.stepperTouch);
stepperTouch.setMinValue(0);
stepperTouch.setMaxValue(3);
stepperTouch.setSideTapEnabled(true);
stepperTouch.addStepCallback(new OnStepCallback() {
    @Override
    public void onStep(int value, boolean positive) {
        Toast.makeText(getApplicationContext(), value + "", Toast.LENGTH_SHORT).show();
    }
});

You're able to further customize or set initial values with styled attributes:

  1. Add res-auto to your xml layout if you haven't yet
xmlns:app="http://schemas.android.com/apk/res-auto"
  1. After that the following attributes will become available:
app:stepperBackgroundColor=""
app:stepperButtonColor=""
app:stepperActionsColor=""
app:stepperActionsDisabledColor=""
app:stepperTextColor=""
app:stepperTextSize=""
app:app:stepperAllowNegative=""
app:app:stepperAllowPositive=""

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory