0
\$\begingroup\$

Currently to open the link i am using button sprite. But now i want to link a text to website. Is there any way to do this in AndEngine?

\$\endgroup\$
1
\$\begingroup\$

Make the link clickable and then go to url using intent.

      Text link = new Text(100, 100, this.mFont, "Link", this.getVertexBufferObjectManager()){

            @Override
    public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {
          switch(pSceneTouchEvent.getAction()) {
          case TouchEvent.ACTION_DOWN:
               Intent i = new Intent(Intent.ACTION_VIEW);
               i.setData(Uri.parse("http://www.google.com"));
               startActivity(i);
                  break;
          }
                        return true;
        }
            };
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.