How to open a website when a Button is clicked in Android application?

前端 未结 10 2060
囚心锁ツ
囚心锁ツ 2020-12-01 00:23

I am designing an app, with several button for users to click on. Once button is clicked, user is directed to appropriate website. How do I accomplish this?

10条回答
  •  抹茶落季
    2020-12-01 00:59

    You can wrap the buttons in anchors that href to the appropriate website.

    
      
    
    
      
    
    
      
    
    

    When the user clicks the button (input) they are directed to the destination specified in the href property of the anchor.

    Edit: Oops, I didn't read "Eclipse" in the question title. My mistake.

提交回复
热议问题