"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Android Button no virtuel button

Hi,

i try to start to open a website with an button clicklistener:

 

 Button web = (Button) this.findViewById(R.id.buttonss);    web.setOnClickListener(new OnClickListener(){        public void onClick(View v) {             Uri uriUrl = Uri.parse("website.com");             Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);             startActivity(launchBrowser);        }            });

 

Did i have to put it in the ImageTargetsRenderer.java or anywhere else.

Tried a lot nothing works

Thanks

AlessandroB

Fri, 06/21/2013 - 18:32

Hi, make sure that your clickable view (button) is added on top of other views.

In ImageTargets.java, a good place where to add custom widgets is the mUILayout (you can find it in the code).

Some changes need to be done in ImageTargetsRenderer (as explained in the article);

however, the Button should be added in the ImageTargets.java; then, from ImageTargetsRenderer you will need some method that calls to another method in ImageTargets.java to show/hide the button