Hi all, I have a HorizontalScrollView with a series of CompoundButtons. I want to find the (x,y) for a given child view. I have tried using: getLocationOnScreen() getLocalVisibleRect() getChildVisibleRect()
like this:
View tmpView = this.findViewById(viewId);
Rect hitRect = new Rect();
tmpView.getLocalVisibleRect(hitRect);
the hitRect is always 0,0 - 0,0.
I need the x,y mainly to scroll to a particular child view. Any help is greatly appreciated. Thanks.