|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.preference.Preference
android.preference.DialogPreference
android.preference.ListPreference
ims.settings.DeviceListPreference
public class DeviceListPreference
Represents the device list preference from the settings fragment, which shows
the paired devices that the user can choose one to connect with the phone.
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.
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 | |
---|---|
DeviceListPreference(android.content.Context context)
Constructor. |
|
DeviceListPreference(android.content.Context context,
android.util.AttributeSet attrs)
Constructor. |
Method Summary | |
---|---|
void |
dismiss()
Wrapper method to dismiss the dialog and remove the SettingsFragment if necessary. |
android.app.Activity |
getActivity()
|
void |
init()
Initializes this preference. |
void |
initDeviceList()
Initializes the list of the Bluetooth Devices, which are paired with the mobile phone. |
void |
onPrepareDialogBuilder(android.app.AlertDialog.Builder builder)
Prepares the dialog builder to be shown when the preference is clicked. |
void |
setActivity(android.app.Activity currentActivity)
|
void |
setSummary()
Setup of the summary text. |
void |
show()
Wrapper method to show the dialog. |
Methods inherited from class android.preference.ListPreference |
---|
findIndexOfValue, getEntries, getEntry, getEntryValues, getSummary, getValue, setEntries, setEntries, setEntryValues, setEntryValues, setSummary, setValue, setValueIndex |
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, 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, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DeviceListPreference(android.content.Context context)
context
- preference's contextpublic DeviceListPreference(android.content.Context context, android.util.AttributeSet attrs)
context
- preference's contextattrs
- list of attributesMethod Detail |
---|
public void init()
OnPreferenceClickListener
is set, which handles
click events on the preference and more important, the
OnPreferenceChangeListener
is set, which calls a new
BluetoothConnectThread
when another device is
selected.
public void setSummary()
public void onPrepareDialogBuilder(android.app.AlertDialog.Builder builder)
onPrepareDialogBuilder
in class android.preference.ListPreference
public void setActivity(android.app.Activity currentActivity)
currentActivity
- to setpublic android.app.Activity getActivity()
public void initDeviceList()
public void show()
public void dismiss()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |