Skip to content

Instantly share code, notes, and snippets.

@ogulcan
Created August 8, 2012 11:09
Show Gist options
  • Save ogulcan/3294317 to your computer and use it in GitHub Desktop.
Save ogulcan/3294317 to your computer and use it in GitHub Desktop.
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.webkit.WebView;
public class CustomWebView extends WebView {
public CustomWebView(Context context) {
super(context);
}
public CustomWebView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public CustomWebView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
try{
super.onWindowFocusChanged(hasWindowFocus);
} catch(NullPointerException e){
Log.v("TAG", "Catched");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment