Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Link button in android

I want to create Link button in android. Can anyone guide me in how I can create a Link button in android?

like image 404
dharmendra Avatar asked Sep 26 '11 13:09

dharmendra


People also ask

How can I tell if an android button is clicked?

If you have more than one button click event, you can use switch case to identify which button is clicked. Link the button from the XML by calling findViewById() method and set the onClick listener by using setOnClickListener() method. setOnClickListener takes an OnClickListener object as the parameter.


1 Answers

Uri uri = Uri.parse("http://www.example.com"); 
Intent intent = new Intent(Intent.ACTION_VIEW, uri); 
startActivity(intent);
like image 58
Lendl Leyba Avatar answered Oct 27 '22 18:10

Lendl Leyba