resolveDimension

open fun resolveDimension(@NonNull context: Context, @AttrRes attributeResId: Int, @DimenRes defaultDimenResId: Int): Int

Returns the pixel value of the dimension specified by attributeResId. Defaults to defaultDimenResId if attributeResId cannot be found or is not a dimension within the given context.