Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Fix a objAnimation crash on Kitkat and below (#104)
Browse files Browse the repository at this point in the history
Fix a crash when objAnimation is not supported and the device's version is lower than `KITKAT 4.4`.
  • Loading branch information
AnMokoto authored and Angelo Marchesin committed Jan 11, 2019
1 parent bc0da79 commit dc10658
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/src/main/java/org/angmarch/views/NiceSpinner.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ protected void onDetachedFromWindow() {
}
super.onDetachedFromWindow();
}

@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
onVisibilityChanged(this, getVisibility());
}
}

@Override
protected void onVisibilityChanged(View changedView, int visibility) {
Expand Down

0 comments on commit dc10658

Please sign in to comment.