Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb5ffbe4 authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Check SDK version before setting category foreground

parent 67680aa3
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -86,7 +86,9 @@ class CategoriesFragment : Fragment() {
            textView.maxLines = 1
            textView.ellipsize = TextUtils.TruncateAt.END
            textView.isClickable = true
            if (android.os.Build.VERSION.SDK_INT >= 23) {
                textView.foreground = activity!!.getDrawable(R.drawable.app_category_border)
            }
            val outValue = TypedValue()
            context!!.theme.resolveAttribute(android.R.attr.selectableItemBackground, outValue, true)
            textView.setBackgroundResource(outValue.resourceId)
@@ -112,7 +114,9 @@ class CategoriesFragment : Fragment() {
            textView.maxLines = 1
            textView.ellipsize = TextUtils.TruncateAt.END
            textView.isClickable = true
            if (android.os.Build.VERSION.SDK_INT >= 23) {
                textView.foreground = activity!!.getDrawable(R.drawable.app_category_border)
            }
            val outValue = TypedValue()
            context!!.theme.resolveAttribute(android.R.attr.selectableItemBackground, outValue, true)
            textView.setBackgroundResource(outValue.resourceId)