2014년 12월 28일 일요일

Url link

how do I mack a url text link or button link?



Many ways... You can add a WebViewer to your project, and set its URL to the link when you click the button, then either display it on the same screen, or open another screen with the webviewer in it.

You can use the Activity Starter to start the default system browser when the button is clicked.  As far as a text link is concerned, it's much harder because labels don't have a click event in AI2.



http://www.appinventor.org/Chapter24 



how do I call the default system browser with a button?



use an ActivityStarter within the button.




if possible could someone show a code example



I tried what is in my post picture but it does not work.

can any one show one that works?




Try 

this Nathaniel.      The Set ActivityStarter blocks could also be placed in the Screen1.Initialize   or in other event handlers.    Or all the three pieces in a single button called "Google URL" or whatever.


댓글 없음:

댓글 쓰기