ims.settings
Class DisconnectPreference

java.lang.Object
  extended by android.preference.Preference
      extended by android.preference.DialogPreference
          extended by ims.settings.DisconnectPreference
All Implemented Interfaces:
android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.preference.PreferenceManager.OnActivityDestroyListener, java.lang.Comparable<android.preference.Preference>

public class DisconnectPreference
extends android.preference.DialogPreference

Represents the disconnect preference from the settings fragment.

Copyright © 2014 by Daniela Blum

This file is part of GPSChildFinder.
GPSChildFinder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses.

Author:
Daniela Blum

Nested Class Summary
 
Nested classes/interfaces inherited from class android.preference.Preference
android.preference.Preference.BaseSavedState, android.preference.Preference.OnPreferenceChangeListener, android.preference.Preference.OnPreferenceClickListener
 
Field Summary
 
Fields inherited from class android.preference.Preference
DEFAULT_ORDER
 
Constructor Summary
DisconnectPreference(android.content.Context context)
          Constructor.
DisconnectPreference(android.content.Context context, android.util.AttributeSet attrs)
          Constructor.
 
Method Summary
 void dismiss()
          Wrapper method for dismissing the dialog.
 void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder)
          Prepares the dialog builder to be shown when the preference is clicked.
 
Methods inherited from class android.preference.DialogPreference
getDialog, getDialogIcon, getDialogLayoutResource, getDialogMessage, getDialogTitle, getNegativeButtonText, getPositiveButtonText, onActivityDestroy, onClick, onDismiss, setDialogIcon, setDialogIcon, setDialogLayoutResource, setDialogMessage, setDialogMessage, setDialogTitle, setDialogTitle, setNegativeButtonText, setNegativeButtonText, setPositiveButtonText, setPositiveButtonText
 
Methods inherited from class android.preference.Preference
compareTo, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isPersistent, isSelectable, notifyDependencyChange, onDependencyChanged, onParentChanged, peekExtras, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setSelectable, setShouldDisableView, setSummary, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisconnectPreference

public DisconnectPreference(android.content.Context context)
Constructor.
Enables the dialog for this preference.

Parameters:
context - preference's context

DisconnectPreference

public DisconnectPreference(android.content.Context context,
                            android.util.AttributeSet attrs)
Constructor.
Enables the dialog for this preference.

Parameters:
context - preference's context
Method Detail

onPrepareDialogBuilder

public void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder)
Prepares the dialog builder to be shown when the preference is clicked. It shows the message, if the current GPS-Bluetooth-device should be disconnected and choices for the user to react.

Overrides:
onPrepareDialogBuilder in class android.preference.DialogPreference

dismiss

public void dismiss()
Wrapper method for dismissing the dialog.