ElasticView
Elastic view is a regular CardView, which can flex from user touches.
Kotlin ❤️
Let's see it in action ??
Download sample apk :arrow_down:
The current minSDK version is API level 21.
Download
Gradle:
implementation 'com.github.armcha:ElasticView:0.1.0'
Setup and usage
You can use it as a regualar CardView.
<io.armcha.elasticview.ElasticView
android:id="@+id/imageElasticView"
android:layout_width="..."
android:layout_height="..."
app:cardCornerRadius="10dp"
app:cardElevation="5dp">
<ChildView.../>
<!--or without childView-->
</io.armcha.elasticview.ElasticView>
Customization
For now, you can only change flexibility for the view
from code
elasticView.flexibility = 8f
or from xml
<io.armcha.elasticview.ElasticView
android:id="@+id/imageElasticView"
android:layout_width="..."
android:layout_height="..."
app:flexibility="7"
app:cardCornerRadius="10dp"
app:cardElevation="5dp"/>