Prevent Launch Browser When Calling loadurl on Webview
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.setWebViewClient(new MyWebViewClient());
myWebView.loadUrl("http://www.example.com");
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
Filtering data in EditText component in Android
dialogNric.setKeyListener(new NumberKeyListener()
{
@Override
public int getInputType()
{
return InputType.TYPE_MASK_VARIATION;
}
@Override
protected char[] getAcceptedChars()
{
return new char[]{'i','o','p','a','s','d','f','g','h','j','k','l','z','x','q','w','e','r','t','y','u','c','v','b','n','m','1','2','3','4','5','6','7','8','9','0'};
}
});
Subscribe to:
Posts (Atom)