BeforeAfterView

Additional

Language
Kotlin
Version
1.0.0 (Jul 20, 2019)
Created
Jul 19, 2019
Updated
Jul 22, 2019 (Retired)
Owner
Fevzi Ömür Tekin (fevziomurtekin)
Contributor
Fevzi Ömür Tekin (fevziomurtekin)
1
Activity
Badge
Generate
Download
Source code

BeforeAfterView

Before After animation library write in Kotlin.


Demo

Setup

Gradle

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
  
  .....

dependencies {
      implementation 'com.github.fevziomurtekin:BeforeAfterView:1.0.0'
   }
}

Layout

   <com.fevziomurtekin.beforeafterview.BeforeAfterView
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           app:bgColor="@android:color/black"
           app:sliderTintColor="@android:color/white"
           app:sliderIconTint="@android:color/white"
           app:afterSrc="@drawable/after"
           app:beforeSrc="@drawable/before"
           app:imageHeightPercent="0.5"
           app:sliderWidthPercent="0.75"
   />

Attributes

Attribute Description
bgColor The color in int of the background color (by default @android:color/black)
sliderTintColor The color int of the slider tint color (by default @android:color/white)
sliderIconTint The size in int of the slider icon color (by default @android:color/white)
afterSrc The resource in int of the imageview src
beforeSrc The resource in int of the imageview src
imageHeightPercent The height percent of the imageView (by default 0.55f)
sliderWidthPercent The width percent of the sliderView (by default 0.65f)

License

The Apache License 2.0 - see LICENSE for more details