Open url with browser if button clicked Android example.

Button, setOnClickListener, Intent.ACTION_VIEW, startActivity Android example.

 
Button mIdButtonHome = (Button)findViewById(R.id.idButtonHome);
	mIdButtonHome.setOnClickListener(new View.OnClickListener() {
		public void onClick(View v) {
			Intent browserIntent = new Intent(
					Intent.ACTION_VIEW,
					Uri.parse("http://android.okhelp.cz/category/software/"));
			startActivity(browserIntent);
		}
	});
This entry was posted in Android Examples Code and tagged , , , , . Bookmark the permalink.


Comments are closed.



16,059 views