Skip to content

Instantly share code, notes, and snippets.

@anugotta
Created April 9, 2015 13:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anugotta/fd0926d45668ba4430cd to your computer and use it in GitHub Desktop.
Save anugotta/fd0926d45668ba4430cd to your computer and use it in GitHub Desktop.
Touch Intercepting Webview which will scroll inside a scrollview.
package com.mypackage.common.custom.android.widgets
public class ScrollableWebview extends WebView {
public CustomWebview(Context context) {
super(context);
}
public CustomWebview(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomWebview(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean onTouchEvent(MotionEvent event){
requestDisallowInterceptTouchEvent(true);
return super.onTouchEvent(event);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment