├── assets ├── text.png ├── color_1.png ├── color_2.png ├── complete.png ├── event_log.png ├── slidetoact.gif ├── custom_icon.png ├── elevation_1.png ├── elevation_2.png ├── example_app.gif ├── ux_friendly.gif ├── area_margin_1.png ├── area_margin_2.png ├── area_margin_3.png ├── border_radius_1.png ├── border_radius_2.png ├── bounce_on_start.gif ├── complete_icon.gif ├── icon_margin_1.png ├── icon_margin_2.png ├── locked_slider.gif ├── reversed_slider.gif ├── slider_height_1.png ├── slider_height_2.png ├── text_appearance.png └── slider_icon_color.png ├── renovate.json ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── example ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── font │ │ │ │ └── montserrat_extrabold.ttf │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── animator │ │ │ │ └── animator_custom_complete.xml │ │ │ ├── menu │ │ │ │ └── main_menu.xml │ │ │ ├── drawable │ │ │ │ ├── custom_complete_animated.xml │ │ │ │ ├── ic_cloud.xml │ │ │ │ ├── custom_icon.xml │ │ │ │ ├── restart.xml │ │ │ │ ├── custom_complete_icon.xml │ │ │ │ └── ic_android.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── layout │ │ │ │ ├── content_locked_slider.xml │ │ │ │ ├── content_completed.xml │ │ │ │ ├── content_reversed_slider.xml │ │ │ │ ├── content_event_callbacks.xml │ │ │ │ ├── content_custom_icon.xml │ │ │ │ ├── content_bumb_vibration.xml │ │ │ │ ├── content_bounce_animation.xml │ │ │ │ ├── content_animation_duration.xml │ │ │ │ ├── content_elevation.xml │ │ │ │ ├── content_area_margin.xml │ │ │ │ ├── content_border_radius.xml │ │ │ │ ├── content_icon_margin.xml │ │ │ │ ├── content_slider_dimensions.xml │ │ │ │ ├── content_text_size.xml │ │ │ │ ├── content_color.xml │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── ncorti │ │ │ └── slidetoact │ │ │ └── example │ │ │ ├── MainActivity.java │ │ │ └── SampleActivity.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── ncorti │ │ └── slidetoact │ │ └── example │ │ ├── testutil │ │ └── SlideViewActions.java │ │ ├── SliderLockedTest.java │ │ ├── SliderResetTest.java │ │ ├── SliderCompletedTest.java │ │ └── SliderEventCallBacksTest.java ├── .gitignore └── build.gradle.kts ├── .gitignore ├── slidetoact ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── styles.xml │ │ │ └── attrs.xml │ │ ├── animator │ │ │ └── slidetoact_animator_ic_check.xml │ │ ├── drawable │ │ │ ├── slidetoact_ic_arrow.xml │ │ │ ├── slidetoact_animated_ic_check.xml │ │ │ └── slidetoact_ic_check.xml │ │ └── drawable-v25 │ │ │ └── slidetoact_ic_check.xml │ │ └── java │ │ └── com │ │ └── ncorti │ │ └── slidetoact │ │ ├── SlideToActIconUtil.kt │ │ └── SlideToActView.kt └── build.gradle.kts ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── workflows │ ├── gradle-wrapper-validation.yml │ ├── pre-merge.yml │ ├── publish-release.yml │ └── publish-snapshot.yml └── ISSUE_TEMPLATE.md ├── settings.gradle.kts ├── gradle.properties ├── LICENSE ├── gradlew.bat ├── gradlew └── README.md /assets/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/text.png -------------------------------------------------------------------------------- /assets/color_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/color_1.png -------------------------------------------------------------------------------- /assets/color_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/color_2.png -------------------------------------------------------------------------------- /assets/complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/complete.png -------------------------------------------------------------------------------- /assets/event_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/event_log.png -------------------------------------------------------------------------------- /assets/slidetoact.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/slidetoact.gif -------------------------------------------------------------------------------- /assets/custom_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/custom_icon.png -------------------------------------------------------------------------------- /assets/elevation_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/elevation_1.png -------------------------------------------------------------------------------- /assets/elevation_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/elevation_2.png -------------------------------------------------------------------------------- /assets/example_app.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/example_app.gif -------------------------------------------------------------------------------- /assets/ux_friendly.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/ux_friendly.gif -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base", 4 | ":automergeMinor" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /assets/area_margin_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/area_margin_1.png -------------------------------------------------------------------------------- /assets/area_margin_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/area_margin_2.png -------------------------------------------------------------------------------- /assets/area_margin_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/area_margin_3.png -------------------------------------------------------------------------------- /assets/border_radius_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/border_radius_1.png -------------------------------------------------------------------------------- /assets/border_radius_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/border_radius_2.png -------------------------------------------------------------------------------- /assets/bounce_on_start.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/bounce_on_start.gif -------------------------------------------------------------------------------- /assets/complete_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/complete_icon.gif -------------------------------------------------------------------------------- /assets/icon_margin_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/icon_margin_1.png -------------------------------------------------------------------------------- /assets/icon_margin_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/icon_margin_2.png -------------------------------------------------------------------------------- /assets/locked_slider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/locked_slider.gif -------------------------------------------------------------------------------- /assets/reversed_slider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/reversed_slider.gif -------------------------------------------------------------------------------- /assets/slider_height_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/slider_height_1.png -------------------------------------------------------------------------------- /assets/slider_height_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/slider_height_2.png -------------------------------------------------------------------------------- /assets/text_appearance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/text_appearance.png -------------------------------------------------------------------------------- /assets/slider_icon_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/assets/slider_icon_color.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/example/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/example/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/font/montserrat_extrabold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/example/src/main/res/font/montserrat_extrabold.ttf -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/example/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/example/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cortinico/slidetoact/HEAD/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | /.idea 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | /.idea 10 | *.hprof 11 | -------------------------------------------------------------------------------- /slidetoact/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | /.idea 10 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Complete 4 | 5 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #FF4081 5 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 8dp 3 | 16dp 4 | 16sp 5 | 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | A few sentences describing the overall goals of the pull request's commits. 3 | 4 | ## Related PRs/Issues 5 | List related PRs and Issues for this Pull Request. 6 | 7 | ## Todos 8 | - [ ] Tests 9 | - [ ] Documentation 10 | - [ ] Screenshots -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | validation: 6 | name: "Validation" 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | - uses: gradle/wrapper-validation-action@v3 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/animator/slidetoact_animator_ic_check.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | google() 6 | } 7 | } 8 | 9 | dependencyResolutionManagement { 10 | repositories { 11 | mavenCentral() 12 | google() 13 | } 14 | } 15 | 16 | 17 | include("slidetoact") 18 | include(":example") 19 | -------------------------------------------------------------------------------- /example/src/main/res/animator/animator_custom_complete.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /example/src/main/res/menu/main_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/custom_complete_animated.xml: -------------------------------------------------------------------------------- 1 | 5 | 8 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/drawable/slidetoact_ic_arrow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/drawable/slidetoact_animated_ic_check.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/ic_cloud.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/drawable/slidetoact_ic_check.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /slidetoact/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/custom_icon.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/restart.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## What kind of issue is this? 2 | 3 | - [ ] UI Bug. Please provide a Screenshot/Video/GIF of what's the problem. If you need help to record a video you can follow [this guide](https://developer.android.com/studio/command-line/adb.html#screenrecord) 4 | 5 | - [ ] Functional Bug. Please describe the scenario of the bug. Furthermore, please spend the time to write a failing test. 6 | 7 | - [ ] Feature Request. Start by telling what's problem you’re trying to solve. A Pull request is welcome as well. 8 | 9 | ## Details 10 | 11 | In case of bug report, please don't forget to include also: 12 | * Library Version. 13 | * Android Version. 14 | * Emulator/Device specs. 15 | * Logs/Crash reports/Stacktraces. 16 | * Example Code/Link to repositories. -------------------------------------------------------------------------------- /slidetoact/src/main/res/drawable-v25/slidetoact_ic_check.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/custom_complete_icon.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2196F3 4 | #1976D2 5 | #FF4081 6 | 7 | #FF5252 8 | #E040FB 9 | #536DFE 10 | #FF6E40 11 | #FFD740 12 | #64FFDA 13 | #69F0AE 14 | 15 | 16 | #424242 17 | #212121 18 | #ffffff 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/layout/content_locked_slider.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/layout/content_completed.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/layout/content_reversed_slider.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | -------------------------------------------------------------------------------- /example/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.application") 3 | } 4 | 5 | android { 6 | compileSdk = 35 7 | defaultConfig { 8 | applicationId = "com.ncorti.slidetoact.example" 9 | minSdk = 14 10 | versionCode = 1 11 | versionName = "1.0" 12 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 13 | } 14 | lint { 15 | abortOnError = true 16 | } 17 | namespace = "com.ncorti.slidetoact.example" 18 | } 19 | 20 | dependencies { 21 | implementation(project(":slidetoact")) 22 | 23 | implementation("androidx.appcompat:appcompat:1.6.1") 24 | implementation("com.google.android.material:material:1.11.0") 25 | 26 | testImplementation("junit:junit:4.13.2") 27 | 28 | androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0") 29 | androidTestImplementation("androidx.test:rules:1.7.0") 30 | androidTestImplementation("androidx.test.ext:junit:1.3.0") 31 | } 32 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/ic_android.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /.github/workflows/pre-merge.yml: -------------------------------------------------------------------------------- 1 | name: Pre Merge Checks 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - '*' 10 | 11 | jobs: 12 | gradle: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout Repo 16 | uses: actions/checkout@v4 17 | 18 | - name: Setup Java 19 | uses: actions/setup-java@v4 20 | with: 21 | distribution: 'zulu' 22 | java-version: '17' 23 | 24 | - name: Build and Test everything 25 | uses: gradle/gradle-build-action@v3 26 | with: 27 | arguments: build publishToMavenLocal 28 | 29 | - name: Upload Library Artifacts 30 | uses: actions/upload-artifact@v4 31 | with: 32 | name: 'snapshot-artifacts' 33 | path: '~/.m2/repository/' 34 | 35 | - name: Upload the built Apk 36 | uses: actions/upload-artifact@v4 37 | with: 38 | name: debug-apk 39 | path: example/build/outputs/apk/debug/example-debug.apk 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Nicola Corti 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /example/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/src/main/res/layout/content_event_callbacks.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 23 | 24 | 32 | -------------------------------------------------------------------------------- /example/src/androidTest/java/com/ncorti/slidetoact/example/testutil/SlideViewActions.java: -------------------------------------------------------------------------------- 1 | package com.ncorti.slidetoact.example.testutil; 2 | 3 | import androidx.test.espresso.ViewAction; 4 | import androidx.test.espresso.action.CoordinatesProvider; 5 | import androidx.test.espresso.action.GeneralClickAction; 6 | import androidx.test.espresso.action.Press; 7 | import androidx.test.espresso.action.Tap; 8 | import android.view.View; 9 | 10 | public class SlideViewActions { 11 | /** 12 | * Perform a click in the center of the View. 13 | */ 14 | public static ViewAction clickCenter() { 15 | return new GeneralClickAction( 16 | Tap.SINGLE, 17 | new CoordinatesProvider() { 18 | @Override 19 | public float[] calculateCoordinates(View view) { 20 | 21 | final int[] screenPos = new int[2]; 22 | view.getLocationOnScreen(screenPos); 23 | final float width = view.getWidth(); 24 | final float height = view.getHeight(); 25 | 26 | final float centerX = screenPos[0] + (width / 2); 27 | final float centerY = screenPos[1] + (height / 2); 28 | 29 | float[] coordinates = {centerX, centerY}; 30 | 31 | return coordinates; 32 | } 33 | }, 34 | Press.FINGER); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SlideToAct Example 3 | Reset 4 | area margin 5 | icon margin 6 | Colors 7 | Border Radius 8 | Elevation 9 | Text Size/Styles 10 | Slider Dimension 11 | Event Callback 12 | Locked Slider 13 | Custom Icon 14 | Reversed Slider 15 | Animation duration 16 | Bump Vibration 17 | Completed 18 | Event Log 19 | Press the following buttons to checkout different SlideToActView and understand each parameter. You can reset the sliders pressing the Reset button in the Toolbar. Enjoy :) 20 | Use Android icon 21 | Use Cloud icon 22 | Complete custom icon 23 | Bounce on start 24 | 25 | -------------------------------------------------------------------------------- /.github/workflows/publish-release.yml: -------------------------------------------------------------------------------- 1 | name: Publish Release 2 | on: 3 | push: 4 | tags: 5 | - '*' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | publish: 10 | runs-on: [ubuntu-latest] 11 | env: 12 | GRADLE_OPTS: -Dorg.gradle.parallel=false 13 | 14 | steps: 15 | 16 | - name: Checkout Repo 17 | uses: actions/checkout@v4 18 | 19 | - name: Setup Java 20 | uses: actions/setup-java@v4 21 | with: 22 | distribution: 'zulu' 23 | java-version: '17' 24 | 25 | - name: Publish to Maven Local 26 | run: ./gradlew publishToMavenLocal 27 | env: 28 | ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} 29 | ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} 30 | 31 | - name: Upload Library Artifacts 32 | uses: actions/upload-artifact@v4 33 | with: 34 | name: 'release-artifacts' 35 | path: '~/.m2/repository/' 36 | 37 | - name: Publish to the Staging Repository 38 | run: ./gradlew publishReleasePublicationToNexusRepository 39 | env: 40 | ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} 41 | ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} 42 | ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_USERNAME }} 43 | ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_PASSWORD }} 44 | -------------------------------------------------------------------------------- /example/src/main/res/layout/content_custom_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 |