3
我有一系列CompoundButtons的HorizontalScrollView。我想找到给定子视图的(x,y)。 getLocationOnScreen() getLocalVisibleRect() getChildVisibleRect()HorizontalScrollView中子视图的位置
这样的::我已经尝试使用 视图tmpView = this.findViewById(viewId); Rect hitRect = new Rect();
tmpView.getLocalVisibleRect(hitRect);
hitRect始终为0,0 - 0,0。
我需要x,y主要是滚动到特定的子视图。任何帮助是极大的赞赏。谢谢。