public abstract class AtakPreferenceFragment
extends android.preference.PreferenceFragment
Modifier and Type | Field and Description |
---|---|
protected android.os.Bundle |
_externalPreferenceBundle |
static java.lang.String |
TAG |
Constructor and Description |
---|
AtakPreferenceFragment(int resourceID,
int summaryID)
Construct a preference fragment with a provided resource identifier
|
Modifier and Type | Method and Description |
---|---|
void |
addPreferences(android.os.Bundle bundle) |
void |
addPreferencesFromIntent(android.content.Intent intent) |
void |
addPreferencesFromResource(int preferencesResId) |
static void |
checkKeyGuard(android.app.Activity activity) |
static void |
checkScreenLock(android.app.Activity activity) |
android.preference.Preference |
findPreference(java.lang.CharSequence key) |
static int |
getOrientation(android.content.Context context) |
int |
getResourceID() |
java.lang.String |
getSubTitle()
Fragment implementations should return the sub title for display in action bar
|
static java.lang.String |
getSubTitle(android.content.Context context,
java.lang.String parent,
java.lang.String title) |
java.lang.String |
getSubTitle(java.lang.String parent,
java.lang.String title) |
java.lang.String |
getSummary() |
int |
getSummaryID() |
protected static java.util.List<PreferenceSearchIndex> |
index(android.content.Context context,
java.lang.Class<? extends AtakPreferenceFragment> clazz,
int summaryResourceId,
int drawableResourceId) |
protected static java.util.List<PreferenceSearchIndex> |
index(android.content.Context context,
java.lang.Class<? extends AtakPreferenceFragment> clazz,
int summaryResourceId,
java.lang.Integer parentSummaryResourceId,
int drawableResourceId)
Create search index for the specific preference fragment
|
protected static java.util.List<PreferenceSearchIndex> |
index(android.content.Context context,
java.lang.Class<? extends AtakPreferenceFragment> clazz,
java.lang.String key,
int summaryResourceId,
int parentSummaryResourceId,
int drawableResourceId,
java.lang.String... terms) |
static java.util.List<PreferenceSearchIndex> |
index(ToolsPreferenceFragment.ToolPreference pref) |
void |
onCreate(android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onResume() |
protected void |
printBundleContents(java.lang.String tag,
android.os.Bundle bundle) |
static void |
removeMainWindowActivity() |
protected void |
removePreference(android.preference.Preference preference)
Method to assist in removal of a preference.
|
static void |
setContext(android.content.Context c)
For plugins we are REQUIRED to set the application context to the
ATAK owned Activity and not the context owned by the plugin.
|
static void |
setMainWindowActivity(android.app.Activity activity) |
static void |
setOrientation(android.app.Activity activity) |
static void |
setOrientation(android.app.Activity activity,
boolean force)
sets the orientation of the screen.
|
protected void |
setPreferenceState(android.preference.Preference p,
boolean state)
Ability to programatically toggle on or off the state of the preference
|
static void |
setSoftKeyIllumination(android.app.Activity activity)
Based on the curent preferences, set the soft illumination key based
according to the google android documentation.
|
protected void |
showScreen(android.preference.PreferenceFragment pf) |
protected void |
showScreen(android.preference.PreferenceFragment pf,
java.lang.String title) |
getPreferenceManager, getPreferenceScreen, onActivityCreated, onActivityResult, onCreateView, onDestroyView, onPreferenceTreeClick, onSaveInstanceState, onStart, onStop, onViewCreated, setPreferenceScreen
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isStateSaved, isVisible, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onTrimMemory, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public static final java.lang.String TAG
protected android.os.Bundle _externalPreferenceBundle
public AtakPreferenceFragment(int resourceID, int summaryID)
resourceID
- the resource id that describes the preference fragment.summaryID
- the resource id that describes the summary/label.public static void setContext(android.content.Context c)
public final int getResourceID()
public final int getSummaryID()
public void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.preference.PreferenceFragment
public void addPreferencesFromResource(int preferencesResId)
addPreferencesFromResource
in class android.preference.PreferenceFragment
public void addPreferencesFromIntent(android.content.Intent intent)
addPreferencesFromIntent
in class android.preference.PreferenceFragment
public android.preference.Preference findPreference(java.lang.CharSequence key)
findPreference
in class android.preference.PreferenceFragment
public void onResume()
onResume
in class android.app.Fragment
public void onDestroy()
onDestroy
in class android.preference.PreferenceFragment
protected void showScreen(android.preference.PreferenceFragment pf)
protected void showScreen(android.preference.PreferenceFragment pf, java.lang.String title)
public java.lang.String getSummary()
public java.lang.String getSubTitle()
public java.lang.String getSubTitle(java.lang.String parent, java.lang.String title)
public static java.lang.String getSubTitle(android.content.Context context, java.lang.String parent, java.lang.String title)
protected void printBundleContents(java.lang.String tag, android.os.Bundle bundle)
public static int getOrientation(android.content.Context context)
public static void setSoftKeyIllumination(android.app.Activity activity)
public static void setOrientation(android.app.Activity activity)
public static void setOrientation(android.app.Activity activity, boolean force)
activity
- the activity to set the orientation on.force
- forces the orientation change request even if the orientation is already set correctly.public static void checkScreenLock(android.app.Activity activity)
public static void checkKeyGuard(android.app.Activity activity)
public static void setMainWindowActivity(android.app.Activity activity)
public static void removeMainWindowActivity()
public void addPreferences(android.os.Bundle bundle)
protected void setPreferenceState(android.preference.Preference p, boolean state)
p
- the preference to enable or disable.state
- the state of the preference (true enabled, false disabled)protected void removePreference(android.preference.Preference preference)
preference
- the preference to removeprotected static java.util.List<PreferenceSearchIndex> index(android.content.Context context, java.lang.Class<? extends AtakPreferenceFragment> clazz, int summaryResourceId, int drawableResourceId)
protected static java.util.List<PreferenceSearchIndex> index(android.content.Context context, java.lang.Class<? extends AtakPreferenceFragment> clazz, int summaryResourceId, java.lang.Integer parentSummaryResourceId, int drawableResourceId)
context
- clazz
- summaryResourceId
- drawableResourceId
- protected static java.util.List<PreferenceSearchIndex> index(android.content.Context context, java.lang.Class<? extends AtakPreferenceFragment> clazz, java.lang.String key, int summaryResourceId, int parentSummaryResourceId, int drawableResourceId, java.lang.String... terms)
public static java.util.List<PreferenceSearchIndex> index(ToolsPreferenceFragment.ToolPreference pref)