Can android operating xml be the same as javascript operating html

  android, question

Now that an xml tag has an event, I want to get the sibling tag of this tag, so I want to use js’s processing method, first find the parent tag of the event, then find the child tag that the parent tag inside wants, and then process it. Android has no one to do this. What is the popular practice

How can events occur on xml? Do you mean UI elements on the interface?
Or does it refer to the event concept of SAX parser inside?


If it is an interface.

Sure。

((ViewGroup)view.getParent()).getChildAt(0);

For example, this way you can get the sibling tag of the control where the event occurred.
The writing of JS should be well understood. . Is to take the child node of the parent node. .


But this is rarely done.

Your requirements are too vague. . . . Isn’t findViewById usually taken out for processing … why do you need to find brother tags?