Code example for Method

Methods: setAccessibleinvoke

0
 
  @Implementation 
  public void scrollTo(int x, int y) {
    try { 
      Method method = View.class.getDeclaredMethod("onScrollChanged", new Class[] {int.class, int.class, int.class, int.class});
      method.setAccessible(true);
      method.invoke(realView, x, y, scrollToCoordinates.x, scrollToCoordinates.y);
    } catch (Exception e) {
      throw new RuntimeException(e);
    } 
    scrollToCoordinates = new Point(x, y);
  } 
 
  @Implementation 
  public int getScrollX() { 
    return scrollToCoordinates != null ? scrollToCoordinates.x : 0;
  } 
 
  @Implementation 
  public int getScrollY() { 
Connect your IDE to all the code out there  Get Codota for Java