Hankkin / PageLayoutDemojava

48 stars 7 forks source link

针对Target为普通ViewGroup的情况进行遍历。 #2

Closed Roben1016 closed 5 years ago

Roben1016 commented 5 years ago
int childCount = content.getChildCount();
                int index = 0;
                View oldContent = null;
                if (targetView instanceof View) {
                    oldContent = (View) targetView;
                    for (int i = 0; i < childCount; i++) {
                        index = i;
                        break;
                    }
                } else {
                    oldContent = content.getChildAt(0);
                }

大佬,这段代码中的遍历貌似不太对,这个index 无论如何都是0

Hankkin commented 5 years ago

已经更新 感谢

Roben1016 commented 5 years ago

好的