/** * Set up the over-scroll over a generic view, assumed to always be over-scroll ready (e.g. * a plain text field, image view). * * @param view The view. * @param orientation One of {@link #ORIENTATION_HORIZONTAL} or {@link #ORIENTATION_VERTICAL}. * * @return The over-scroll effect 'decorator', enabling further effect configuration. */ public static IOverScrollDecor setUpStaticOverScroll(View view, int orientation) { switch (orientation) { case ORIENTATION_HORIZONTAL: return new HorizontalOverScrollBounceEffectDecorator(new StaticOverScrollDecorAdapter(view)); case ORIENTATION_VERTICAL: return new VerticalOverScrollBounceEffectDecorator(new StaticOverScrollDecorAdapter(view)); default: throw new IllegalArgumentException("orientation"); } }