mirror of https://github.com/tasks/tasks
Error catching spinner to catch crashes when rotating spinners in control sets (still leaks windows)
parent
14c36867ed
commit
6e3f0d7765
@ -0,0 +1,22 @@
|
|||||||
|
package com.todoroo.astrid.ui;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
|
||||||
|
public class ErrorCatchingSpinner extends Spinner {
|
||||||
|
|
||||||
|
public ErrorCatchingSpinner(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDetachedFromWindow() {
|
||||||
|
try {
|
||||||
|
super.onDetachedFromWindow();
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// Bad times
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue