Merge branch 'audiorecorder-1.1.14'
This commit is contained in:
commit
305afa310e
2 changed files with 11 additions and 7 deletions
|
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 23
|
||||
versionCode 34
|
||||
versionName "1.1.13"
|
||||
versionCode 35
|
||||
versionName "1.1.14"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ package com.github.axet.audiorecorder.animations;
|
|||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationSet;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.Transformation;
|
||||
|
||||
|
|
@ -28,8 +26,8 @@ public class StepAnimation extends Animation {
|
|||
|
||||
if (animate) {
|
||||
if (m.hasEnded()) {
|
||||
if ((expand && v.getVisibility() == View.GONE) || (!expand && v.getVisibility() == View.VISIBLE)) {
|
||||
StepAnimation mm = c.create();
|
||||
StepAnimation mm = c.create();
|
||||
if (mm.animationReady()) {
|
||||
mm.startAnimation(v);
|
||||
} else {
|
||||
// do nothing, already visible view
|
||||
|
|
@ -54,7 +52,8 @@ public class StepAnimation extends Animation {
|
|||
} else {
|
||||
StepAnimation mm = c.create();
|
||||
if (animate) {
|
||||
if ((expand && v.getVisibility() == View.GONE) || (!expand && v.getVisibility() == View.VISIBLE)) {
|
||||
Log.d("123", "new " + expand + " " + mm.view.getVisibility());
|
||||
if (mm.animationReady()) {
|
||||
mm.startAnimation(v);
|
||||
} else {
|
||||
// do nothing. already visible
|
||||
|
|
@ -71,6 +70,11 @@ public class StepAnimation extends Animation {
|
|||
this.expand = expand;
|
||||
}
|
||||
|
||||
// start animation only if view in proper visible state. gone for expanding, and visible for collapsing.
|
||||
public boolean animationReady() {
|
||||
return (expand && view.getVisibility() == View.GONE) || (!expand && view.getVisibility() == View.VISIBLE);
|
||||
}
|
||||
|
||||
public void startAnimation(View v) {
|
||||
init();
|
||||
// do first step to hide view (we animation does it).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue