Example usage for android.widget ListView getClass

List of usage examples for android.widget ListView getClass

Introduction

In this page you can find the example usage for android.widget ListView getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:Main.java

public static void scrollByOffset(ListView v, int off) {
    //v.smoothScrollByOffset(pos);
    try {/*from w w  w . ja v  a2 s  . c  o  m*/
        Method m = v.getClass().getMethod("smoothScrollByOffset", new Class[] { int.class });
        m.invoke(v, off);
    } catch (Exception e) {
    }
}

From source file:Main.java

public static void scrollToPosition(ListView v, int pos) {
    //v.smoothScrollToPosition(pos);
    try {/*  w w  w  .j  a  va2  s  . co  m*/
        Method m = v.getClass().getMethod("smoothScrollToPosition", new Class[] { int.class });
        m.invoke(v, pos);
    } catch (Exception e) {
    }
}