Remove ThemeHelper.resolveResourceIdFromAttr
This commit is contained in:
parent
df52a6ea6b
commit
a9e8b3e06b
1 changed files with 0 additions and 15 deletions
|
@ -23,7 +23,6 @@ import android.app.Activity;
|
|||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.TypedValue;
|
||||
|
||||
import androidx.annotation.AttrRes;
|
||||
|
@ -204,20 +203,6 @@ public final class ThemeHelper {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a resource id from a resource styled according to the context's theme.
|
||||
*
|
||||
* @param context Android app context
|
||||
* @param attr attribute reference of the resource
|
||||
* @return resource ID
|
||||
*/
|
||||
public static int resolveResourceIdFromAttr(final Context context, @AttrRes final int attr) {
|
||||
final TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
|
||||
final int attributeResourceId = a.getResourceId(0, 0);
|
||||
a.recycle();
|
||||
return attributeResourceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a color from an attr styled according to the context's theme.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue