getChildByTag

源码里面对这个进行了注释:
/**

  • Gets a child from the container with its tag.
  • @param tag An identifier to find the child node.
  • @return a Node object whose tag equals to the input parameter.
  • Please use** getChildByName()** instead.
    */

为什么说要用Name代替?getChildByName与getChildByTag都是循环遍历,但是相对来说不应该是用tag更加快吗?

用哪个都一样。只是用name能更直观的看出来取的是哪个,用tag没那么直观罢了

在这里两个方法中都只能获得一个对象,如果想要获得所有相同tag或者相同name的对象是不是只能通过getChildren()之后再自己人工筛选?