Should I use Dialog or DialogPreference to make a specialized preference dialog?

633 views Asked by At

I'm trying to make a custom setting in my application's PreferenceActivity that brings up a Dialog which will ultimately have the following

  1. An EditText to specify a server
  2. A Button for testing the server connection
  3. A response Icon specifying if the server has been reached

I am making some progress creating a custom Dialog, but I've also encountered the DialogPreference class which seems to be useful for this type of feature.

I'm wondering if there is any reason for me to start trying to use DialogPreference or if it is reasonable for me to continue toying around with a simple custom Dialog.

Will I run into any problems with either?

1

There are 1 answers

2
prolink007 On BEST ANSWER

I would suggest using the DialogPreference. DialogPreference is provided to you for this exact situation. And you should not run into any problems.

However, if you are already almost done... then continue with what you have.

Also, if you are wanting your DialogPreference to launch other dialogs, like confirmations or whatever, you should use Dialog.