Is there a way to check if a view contains another certain view? (indexOfChild only works with one level of hierarchy)
If child doesn't have an id, try something like this:
child.getParent() == parent
You can use findViewById()
to find the view.
like:
yourview.findViewById(R.id.childView);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With