diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/overrides/SafeListView.java b/app/src/main/java/com/wbrawner/simplemarkdown/view/overrides/SafeListView.java deleted file mode 100644 index 52ca59f..0000000 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/overrides/SafeListView.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.wbrawner.simplemarkdown.view.overrides; - -import android.content.Context; -import android.util.AttributeSet; -import android.widget.ListView; - -public class SafeListView extends ListView { - public SafeListView(Context context) { - super(context); - } - - public SafeListView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public SafeListView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - @Override - protected void onDetachedFromWindow() { - try { - super.onDetachedFromWindow(); - } catch (Exception ignored) { - // TODO: report this? - } - } -} diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/overrides/SafeListView.kt b/app/src/main/java/com/wbrawner/simplemarkdown/view/overrides/SafeListView.kt new file mode 100644 index 0000000..d645a7c --- /dev/null +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/overrides/SafeListView.kt @@ -0,0 +1,20 @@ +package com.wbrawner.simplemarkdown.view.overrides + +import android.content.Context +import android.util.AttributeSet +import android.widget.ListView + +class SafeListView : ListView { + constructor(context: Context) : super(context) + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) + + constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) + + override fun onDetachedFromWindow() { + try { + super.onDetachedFromWindow() + } catch (ignored: Exception) { + } + } +}