You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on injecting a custom layout in my app using setInjectLayoutResourceListener. The layout injection works fine, but I'm struggling to access the View IDs defined in the new selector layout XML.
.setInjectLayoutResourceListener(object : OnInjectLayoutResourceListener {
override fun getLayoutResourceId(context: Context, resourceSource: Int): Int {
return when (resourceSource) {
InjectResourceSource.MAIN_SELECTOR_LAYOUT_RESOURCE -> R.layout.ps_custom_fragment_selector
else -> 0
}
}
})
Is there a specific way to get the IDs of views from an injected layout in this setup? Any guidance or best practices would be much appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone,
I'm working on injecting a custom layout in my app using setInjectLayoutResourceListener. The layout injection works fine, but I'm struggling to access the View IDs defined in the new selector layout XML.
Is there a specific way to get the IDs of views from an injected layout in this setup? Any guidance or best practices would be much appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions