Possibility of removing package name on id attribute

Is it possible to skip package name with resource-id as attribute?
Like android.view.ViewGroup[@resource-id=‘app.demo.dev:id/demoid’]
to android.view.ViewGroup[@resource-id=‘demoid’].
I am trying this but its not working.

I got it with android.view.ViewGroup[contains(@resource-id,demoid)]
Now package does not matter as the id will be same across all environments

similar

@AndroidFindBy(uiAutomator = "new UiSelector().resourceIdMatches(\".*demoid\")")

@Aleksei any idea which would be faster?

with android both quite fast.