Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only animate when the button is marked as clickable #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamescoggan
Copy link

@jamescoggan jamescoggan commented Jan 25, 2018

The button was animating even when marked as not clickable

Changes to conform to the View CLICKABLE

Reference:
https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/view/View.java#L6144

Also raised in: #6

@anisharya16
Copy link

anisharya16 commented Apr 16, 2018

i want that whenever i click on the button, it animates for some duration(say 2 seconds) and then another activity is opened through intent. how can it be done?
in the layout i added:

android:onClick="moveTo"

and in mainactivity:

public void moveTo(View view) {
Intent intent = new Intent(this,login.class);
startActivity(intent);
}

whenever i click on the button, the new activity is opened instantly and animation is not seen by then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants