Elastic view is a regular CardView, which can flex from user touches
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7e06b81 Nov 13, 2018
Permalink
Failed to load latest commit information.
.idea Version 0.2.0 Nov 13, 2018
app Migration to androidX Nov 13, 2018
elastic_view Version 0.2.0 Nov 13, 2018
gradle/wrapper Initial message Oct 25, 2018
screens Add files via upload Oct 30, 2018
.gitignore Initial message Oct 25, 2018
README.md Version 0.2.0 Nov 13, 2018
build.gradle Migration to androidX Nov 13, 2018
gradle.properties Migration to androidX Nov 13, 2018
gradlew Initial message Oct 25, 2018
gradlew.bat Initial message Oct 25, 2018
settings.gradle Added library module Oct 25, 2018

README.md

ElasticView

Download API Android Arsenal

Elastic view is a regular CardView, which can flex from user touches💪

Kotlin ❤️

Let's see it in action 💻📲

Download sample apk ⬇️

The current minSDK version is API level 21.

Download

Gradle:

implementation 'com.github.armcha:ElasticView:0.2.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"/>

Note the flexibility must be between [1f..10f] ❗️

That's all 👌

Contact 📖

▶️ Email: chatikyana@gmail.com

▶️ Medium: https://medium.com/@chatikyan

▶️ Twitter: https://twitter.com/ArmanChatikyan

▶️ Google+: https://plus.google.com/+ArmanChatikyan

▶️ Website: https://armcha.github.io/

License

  ElasticView
  Copyright (c) 2018 Arman Chatikyan (https://github.com/armcha/ElasticView).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.