depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

Android TextView making clickable url links

December 9, 2011 by The Man

So simple


	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.help);
        
        TextView urlText;
        urlText = (TextView) findViewById(R.id.lblInfo4);
        String text = "Finally if you need more information then please pop over to support.depicus.com or " +
        		"tweet me @depicus.";
        urlText.setText(Html.fromHtml(text));
        urlText.setMovementMethod(LinkMovementMethod.getInstance());
	}

And it should look like this