-
@ApiStatus.Internal() public final class ViewUtils
-
-
Method Summary
Modifier and Type Method Description static StringgetResourceIdOrNull(@NotNull() View view)Retrieves the human-readable view id based on {@code view.getContext().getResources()}, or{@code null}when the view has no resource-backed id.-
-
Method Detail
-
getResourceIdOrNull
@Nullable() static String getResourceIdOrNull(@NotNull() View view)
Retrieves the human-readable view id based on
{@code view.getContext().getResources()}, or{@code null}when the view has no resource-backed id. Returning{@code null}rather thanthrowing avoids exception-driven control flow on hot, main-thread paths such as view-hierarchysnapshots and gesture target resolution.- Parameters:
view- - the view whose id is being retrieved
-
-
-
-