Question

I would like to have a checkbox preference that takes the user to a new (sub)preference screen if the user presses on the actual text (and not on the checkbox to the right).

Just as the control under Settings -> Wireless -> Mobile Network Settings -> Access Point Names.

Was it helpful?

Solution

Two possibilities:

1) You can get android source code and see how they do it.

2) Check options in this question. I was trying to move to an specific DialogPreference. I your particular case I think it's better to create and show a new Dialog.

OTHER TIPS

On my Nexus One, there is no checkbox on the Access Point Names preference. It is also not on the Android 2.1 emulator, the Motorola CLIQ, the Google Ion, or the T-Mobile G1.

The pattern that you describe would seem to violate the way the preference UI is set up.

That being said, if you do find a preference built into Android that behaves the way you want, you can go find it in the open source code. Many of the preferences used by Settings are not part of the public API, but you can clone their implementation into your own project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top