How to add a hyperlink into a Preference Screen (PreferenceActivity)

android, android-activity, eclipse, preferences, xml

Solution

You don't want "hyperlinks", then. You want entries in the `PreferenceScreen` that, when tapped, launch some activity, such as to bring up a Web page on your desired URL.

That is covered by the `<intent>` element:

<Preference android:title="@string/prefs_web_page" >
    <intent android:action="android.intent.action.VIEW"
            android:data="http://www.example.com" />
</Preference>

Include those in your preference XML that you use to populate your `PreferenceScreen`, and when the user taps on the preference entry, your requested activity will start.

Problem

I would like to add three hyperlinks a Preference screen, which makes use of the PreferenceActivity if possible. Can I do this, if so, could someone provide support? Many thanks,

Original source