Code Monkey home page Code Monkey logo

liquid-swipe-android's Introduction

Liquid Swipe

GitHub license

Animation

Requirements

  • Android 5.0+

Example

To run the example project, clone the repo, and run app

As library

GitHub Packages

Step 1 : Generate a Personal Access Token for GitHub

  • Inside you GitHub account:
  • Settings -> Developer Settings -> Personal Access Tokens -> Generate new token
  • Make sure you select the following scopes (“ read:packages”) and Generate a token
  • After Generating make sure to copy your new personal access token. You cannot see it again! The only option is to generate a new key.

Step 2: Store your GitHub — Personal Access Token details

  • Create a github.properties file within your root Android project
  • In case of a public repository make sure you add this file to .gitignore for keep the token private
  • Add properties gpr.usr=GITHUB_USERID and gpr.key=PERSONAL_ACCESS_TOKEN
  • Replace GITHUB_USERID with personal / organisation Github User ID and PERSONAL_ACCESS_TOKEN with the token generated in #Step 1

Step 3 : Update build.gradle inside the application module

  • Add the following code to build.gradle inside the app module that will be using the library
    def githubProperties = new Properties()
    githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
    repositories {
        maven {
            name = "GitHubPackages"

            url = uri("https://maven.pkg.github.com/Cuberto/liquid-swipe-android")
            credentials {
                /** Create github.properties in root project folder file with     
                ** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN 
                ** Or set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
                username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
                password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
            }
        }
    }
  • inside dependencies of the build.gradle of app module, use the following code
    dependencies {
        //consume library
        implementation 'com.cuberto:liquid-swipe:1.0.0'
        ....
    }

Sync project and now you can use flashytabbar library

Usage

Add LiquidPager to your xml and use it like you would ViewPager


    <com.cuberto.liquid_swipe.LiquidPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
        

iOS

Similar library LiquidSwipe by Cuberto

Author

Cuberto Design, [email protected]

License

Liquid Swipe is available under the MIT license. See the LICENSE file for more info.

liquid-swipe-android's People

Contributors

boogl avatar leohoneybeard avatar mixey69 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar

liquid-swipe-android's Issues

Button doesn't work in the last page

Hello!
Thanks for your library!)
I need to add a button in a last page of my liquid-swipe, however it doesn't do anything...
Could you please help me with that?

Error with last version of android studio and gradle

Please need help i have used liquid swipe before with no problem but it want work with last version of android studio and gradle w this the error i got :

A problem occurred evaluating settings 'MyApp'.

No signature of method: org.gradle.initialization.DefaultProjectDescriptor.file() is applicable for argument types: (String) values: [github.properties]
Possible solutions: find(), find(groovy.lang.Closure), with(groovy.lang.Closure), use([Ljava.lang.Object;), is(java.lang.Object), wait()

Unable to Resolve the Dependency Although I am providing my correct user id and token key

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

animation got struck

Instead of swiping left directly, if we tap the screen 2-3 times on the screen. Animation got struck. Left swipe is not working on the particular button provided. We need to start dragging from some other edge on the right side and the animation resumes.

Update For Gradle Kotlin DSL

Update for all those using kotlin dsl.

Step 3 : Update build.gradle.kts inside the project module

  • add the following line in repositories under projects
 maven { setUrl("https://maven.pkg.github.com/Cuberto/liquid-swipe-android") }
  • you should have something that looks close to this
allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { setUrl("https://maven.pkg.github.com/Cuberto/liquid-swipe-android") }
    }
}

Step 4 : Update build.gradle.kts inside the app module that is using the library

  • add the following imports at the top of the file
import org.jetbrains.kotlin.konan.properties.Properties
import java.io.FileInputStream
  • read the needed vaues from the github.properties file
val props = Properties().apply {
    load(FileInputStream(File(rootProject.rootDir, "github.properties")))
}
val githubUserId: String? = props.getProperty("gpr.user")
val githubApiKey:String? = props.getProperty("gpr.key")

repositories {
    maven(url = uri("https://maven.pkg.github.com/Cuberto/liquid-swipe-android")) {
        name = "GitHubPackages"
        credentials {
            username = githubUserId ?: System.getenv("GPR_USER")
            password = githubApiKey ?: System.getenv("GPR_API_KEY")
        }
    }
}
  • inside dependencies use the following code to consume the library
    dependencies {
        implementation "com.cuberto:liquid-swipe:1.0.0"
        ....
    }
  • Sync project and now you can use liquid-swipe library

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/ViewKt;

Getting runtime error of
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/ViewKt;

at com.cuberto.liquid_swipe.LiquidPager.getBitmapAt(LiquidPager.kt:71)
at com.cuberto.liquid_swipe.LiquidPager.getBitmap(LiquidPager.kt:66)
at com.cuberto.liquid_swipe.animation.RightEdgeController.onPageChanged(RightEdgeController.kt:66)
at com.cuberto.liquid_swipe.LiquidPager.onDraw(LiquidPager.kt:137)

Doesn't work on older android versions. Just works on android 8.0 Oreo upward

Nice job, really cool animation! The only issue I had is that it doesn't run on android 7.1, 7.0, 6.0 and 5.0 versions. it is just stuck on the first screen. On smaller screen sizes some part of the layout is cut off.
I tested it using the Android emulator with the pixel devices provided via AVD. Thanks in advance.

api

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

Android Studio Arctic Fox and gradle 7.0 error

I'm on the last version of android studio and gradle,
In this version in the build.gradle there no allprojects{repositories.{..}} any more i dont know why.
When i added manually and i past the code mentioned in the readme file i got an error :

A problem occurred evaluating project 'MyApp'.

Build was configured to prefer settings repositories over project repositories but repository 'GitHubPackages' was added by build file 'app\build.gradle'

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.