I have a PreferenceActivity Class that has the following code.
Using this code, I am able to start MyActivity.
I want to know how to do this declaratively from the XML file inside PreferenceScreen tag. How to do it without writing code, there must be some way.
SCJP2, SCWCD
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32768
posted
0
How to do it without writing code, there must be some way.
Why? The usual flow is to return to the previous activity after the preferences are done with. Starting some other activity is hardly a common use case.
I have a preferences screen that has an option, which I click will list all the contacts.So this has to be done in an Activity I guess.
Also, in Google API Demos, there is an example that starts an activity from Preferences and that also declaratively using XML. The problem is, it is starting a browser that opens up www.android.com.
I want a declarative example how to declare intent tag that will be able to launch a normal Activity class.