mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 09:47:13 +00:00
Clear animator target
This commit is contained in:
parent
440759066d
commit
da27db5988
2 changed files with 4 additions and 1 deletions
|
@ -814,6 +814,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
RecyclerView.Adapter.class.isAssignableFrom(type)) {
|
RecyclerView.Adapter.class.isAssignableFrom(type)) {
|
||||||
Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName());
|
Log.i("Clearing " + f.getClass().getSimpleName() + ":" + field.getName());
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
|
|
||||||
|
if (Animator.class.isAssignableFrom(type))
|
||||||
|
((Animator) field.get(f)).setTarget(null);
|
||||||
|
|
||||||
field.set(f, null);
|
field.set(f, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -661,7 +661,6 @@ public class Helper {
|
||||||
public void onDestroyed() {
|
public void onDestroyed() {
|
||||||
try {
|
try {
|
||||||
animator.removeUpdateListener(listener);
|
animator.removeUpdateListener(listener);
|
||||||
fab.setAlpha(1.0f);
|
|
||||||
owner.getLifecycle().removeObserver(this);
|
owner.getLifecycle().removeObserver(this);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
|
|
Loading…
Reference in a new issue