Java Code Examples for android.view.View.setTouchDelegate()

The following are Jave code examples for showing how to use setTouchDelegate() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: iosched-reader   File:   Source Code and License Vote up 2 votes
 * Helper to create and setup a {@link FractionalTouchDelegate} between the
 * given {@link View}.
 * @param source Larger source {@link View}, usually a parent, that will be
 *            assigned {@link View#setTouchDelegate(TouchDelegate)}.
 * @param target Smaller target {@link View} which will receive
 *            {@link MotionEvent} that land in requested fractional area.
 * @param sourceFraction Fractional area projected onto source {@link View}
 *            which determines when {@link MotionEvent} will be passed to
 *            target {@link View}.
public static void setupDelegate(View source, View target, RectF sourceFraction) {
    source.setTouchDelegate(new FractionalTouchDelegate(source, target, sourceFraction));