How to linkify activity

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

How to linkify activity

Postby hydroxboys » Wed Oct 20, 2010 4:54 pm

I just trying to linkify a text with the Linkify class recently but I'm stuck at how to showing new activity after clicking those links?!
here's the screenshoot of my pages:
There's a 'Register' link that I want to show new Activity after a click takes place.

And this is my code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.tech2eco.login;
  3. import java.util.regex.Pattern;
  5. import;
  6. import android.os.Bundle;
  7. import android.text.util.Linkify;
  8. import android.widget.TextView;
  10. public class verify extends Activity {
  11.     private TextView regist;
  12.     public void onCreate(Bundle savedInstanceState) {
  13.                 super.onCreate(savedInstanceState);
  14.         setContentView(R.layout.main); 
  15.                 regist=(TextView) findViewById(;
  16.         Pattern regit=Pattern.compile("register");
  17.         String uri="content://com.tech2eco.login.register/";
  18.         Linkify.addLinks(regist,regit, uri);
  19.         }
  20. }
Parsed in 0.015 seconds, using GeSHi

Maybe you are all having a simpler way to done this?
Thanks a lot for your answers.
Once Poster
Once Poster
Posts: 1
Joined: Wed Oct 20, 2010 4:37 pm


Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests