Skip to content

A library for Android developers who want to create "push down animation click" for view like spotify application.

License

Notifications You must be signed in to change notification settings

naseemakhtar994/pushdown-anim-click

 
 

Repository files navigation

「 Push Down Animation Click 」

alt text

Build Status Download

A library for Android developers who want to create "push down animation click" for view like spotify application. :)

alt text alt text

「 DEMO APPLICATION 」

clone repo and build it :)

「 Installation 」

Maven

<dependency>
  <groupId>com.github.thekhaeng</groupId>
  <artifactId>pushdown-anim-click</artifactId>
  <version>1.0.7</version>
  <type>pom</type>
</dependency>

Gradle

compile( 'com.github.thekhaeng:pushdown-anim-click:1.0.7' ){
    exclude group: 'com.android.support'
}

「 Usage 」

Button button = findViewById( R.id.button );

PushDownAnim.setOnTouchPushDownAnim( button )
        .setOnClickListener( new View.OnClickListener(){
            @Override
            public void onClick( View view ){
                Toast.makeText( MainActivity.this, "PUSH DOWN !!", Toast.LENGTH_SHORT ).show();
            }

        } );

full option

PushDownAnim.setOnTouchPushDownAnim( button,
        new View.OnTouchListener(){
            @Override
            public boolean onTouch( View view, MotionEvent motionEvent ){
                return false;
            }
        } )
        .setScale( PushDownAnim.DEFAULT_PUSH_SCALE )
        .setDurationPush( PushDownAnim.DEFAULT_PUSH_DURATION )
        .setDurationRelease( PushDownAnim.DEFAULT_RELEASE_DURATION )
        .setInterpolatorPush( PushDownAnim.DEFAULT_INTERPOLATOR )
        .setInterpolatorRelease( PushDownAnim.DEFAULT_INTERPOLATOR )
        .setOnClickListener( new View.OnClickListener(){
            @Override
            public void onClick( View view ){
                Toast.makeText( MainActivity.this, "PUSH DOWN !!", Toast.LENGTH_SHORT ).show();
            }
        } );

Licence

Copyright 2017 TheKhaeng

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or 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.

Developed By Thai android developer.

TheKhaeng

Follow facebook.com/thekhaeng.io on Facebook page. or @nonthawit at my Medium blog. :)

For contact, shoot me an email at [email protected]

About

A library for Android developers who want to create "push down animation click" for view like spotify application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%