List of utility methods to do ListView Set
void | addListFooter(Context context, ListView listView) add List Footer int navigationBarSize = context.getResources() .getDimensionPixelSize( context.getResources() .getIdentifier("navigation_bar_height", "dimen", "android")); TextView padding = new TextView(context); padding.setHeight(navigationBarSize); listView.addFooterView(padding); ... |
List | createMotionEvents( final AbsListView absListView, final float fromY, final float toY) create Motion Events int x = (int) (absListView.getX() + absListView.getWidth() / 2); List<MotionEvent> results = new ArrayList<>(); results.add(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, x, fromY, 0)); float diff = (toY - fromY) / 25; float y = fromY; for (int i = 0; i < 25; i++) { ... |