Code example for ImageButton

Methods: requestFocus

0
			}});	 
		go_btn.setOnClickListener(new OnClickListener(){
 
			@Override 
			public void onClick(View clickedView) {
				go_btn.requestFocus();
				String url = url_text.getText().toString();
				if (!url.equals("")){
					if (!url.contains(".")){
						try { 
							url = "http://www.google.com/m?q=" + URLEncoder.encode(url, "utf-8");
						} catch (UnsupportedEncodingException e) {}
					} 
					if (!url.contains("://")){
						url = "http://" + url;
					} 
					 
					myWebView.loadUrl(url);	
				} 
			}