Remove ThemeHelper.resolveResourceIdFromAttr

This commit is contained in:
krlvm 2021-03-28 12:17:17 +03:00
parent df52a6ea6b
commit a9e8b3e06b
No known key found for this signature in database
GPG key ID: B8552A91FD265536

View file

@ -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.
*