Skip to content

Commit

Permalink
logs and concurency fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Kwiecień committed Jul 11, 2015
1 parent 5887ab7 commit 64d987a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions switcher-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 11
versionName "1.1.1"
versionCode 12
versionName "1.1.2"
renderscriptTargetApi 22
renderscriptSupportModeEnabled true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,22 @@ public FadeInListener(View view) {
this.view = view;
}

@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
Log.i(Switcher.class.getSimpleName(), String.format("fadeIn START: %s", view.getContext().getResources().getResourceName(view.getId())));
}

@Override
public void onAnimationEnd(Animator animation) {
onAnimationEnd();
}

public void onAnimationEnd() {
Log.i(Switcher.class.getSimpleName(), String.format("fadeIn END: %s", view.getContext().getResources().getResourceName(view.getId())));
view.setVisibility(View.VISIBLE);
if (view.getVisibility() != View.VISIBLE) {
Log.i(Switcher.class.getSimpleName(), String.format("fadeIn END: %s", view.getContext().getResources().getResourceName(view.getId())));
view.setVisibility(View.VISIBLE);
}
}
}

Expand All @@ -73,14 +81,22 @@ public FadeOutListener(View view) {
this.view = view;
}

@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
Log.i(Switcher.class.getSimpleName(), String.format("fadeOut START: %s", view.getContext().getResources().getResourceName(view.getId())));
}

@Override
public void onAnimationEnd(Animator animation) {
onAnimationEnd();
}

public void onAnimationEnd() {
Log.i(Switcher.class.getSimpleName(), String.format("fadeOut END: %s", view.getContext().getResources().getResourceName(view.getId())));
view.setVisibility(View.INVISIBLE);
if (view.getVisibility() == View.VISIBLE) {
Log.i(Switcher.class.getSimpleName(), String.format("fadeOut END: %s", view.getContext().getResources().getResourceName(view.getId())));
view.setVisibility(View.INVISIBLE);
}
}
}
}

0 comments on commit 64d987a

Please sign in to comment.