Created
August 8, 2012 11:09
-
-
Save ogulcan/3294317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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