File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ import org.schabi.newpipe.local.feed.item.StreamItem
7575import org.schabi.newpipe.local.feed.service.FeedLoadService
7676import org.schabi.newpipe.local.subscription.SubscriptionManager
7777import org.schabi.newpipe.util.DeviceUtils
78- import org.schabi.newpipe.util.DrawableResolver.Companion. resolveDrawable
78+ import org.schabi.newpipe.util.DrawableResolver.resolveDrawable
7979import org.schabi.newpipe.util.Localization
8080import org.schabi.newpipe.util.NavigationHelper
8181import org.schabi.newpipe.util.ThemeHelper.getGridSpanCountStreams
Original file line number Diff line number Diff line change @@ -2,25 +2,24 @@ package org.schabi.newpipe.util
22
33import android.content.Context
44import android.graphics.drawable.Drawable
5+ import android.util.TypedValue
56import androidx.annotation.AttrRes
67
78/* *
89 * Utility class for resolving [Drawables](Drawable)
910 */
10- class DrawableResolver {
11- companion object {
12- @JvmStatic
13- fun resolveDrawable (context : Context , @AttrRes attrResId : Int ): Drawable ? {
14- return androidx.core.content.ContextCompat .getDrawable(
15- context,
16- android.util.TypedValue ().apply {
17- context.theme.resolveAttribute(
18- attrResId,
19- this ,
20- true
21- )
22- }.resourceId
23- )
24- }
11+ object DrawableResolver {
12+ @JvmStatic
13+ fun resolveDrawable (context : Context , @AttrRes attrResId : Int ): Drawable ? {
14+ return androidx.core.content.ContextCompat .getDrawable(
15+ context,
16+ TypedValue ().apply {
17+ context.theme.resolveAttribute(
18+ attrResId,
19+ this ,
20+ true
21+ )
22+ }.resourceId
23+ )
2524 }
2625}
You can’t perform that action at this time.
0 commit comments