public static interface HoodAPI.Extension
Modifier and Type | Method and Description |
---|---|
android.view.View.OnTouchListener |
createArbitraryTapListener(int numOfTaps,
android.view.View.OnClickListener onClickListener)
A click listener for arbitrary sequences of taps (ie. for double-tap).
|
java.lang.CharSequence |
createFullLabel(java.lang.CharSequence shortLabel,
java.lang.CharSequence fullLabel)
Creates a label that can be used
HoodAPI.createPropertyEntry(java.lang.CharSequence, at.favre.lib.hood.interfaces.values.DynamicValue<java.lang.String>, at.favre.lib.hood.interfaces.actions.OnClickAction, boolean) type of entries. |
OnClickAction |
createOnClickActionAskPermission(java.lang.String androidPermission,
android.app.Activity activity)
|
OnClickAction |
createOnClickActionDialog()
|
OnClickAction |
createOnClickActionStartIntent(android.content.Intent intent)
|
OnClickAction |
createOnClickActionToast()
|
Section.ModifiableHeaderSection |
createSection(java.lang.String header)
Creates an empty
Section with given header element |
Section.ModifiableHeaderSection |
createSection(java.lang.String header,
java.util.List<PageEntry<?>> entries)
Creates an section with given header an page entry elements
|
Pages |
createUnmodifiablePages(Pages pages)
Wraps given pages in an unmodifiable wrapper
|
ManagerControl |
registerShakeToOpenDebugActivity(android.content.Context ctx,
android.content.Intent intent)
Creates a shake listener that will start the activity for given intent.
|
Section.ModifiableHeaderSection createSection(java.lang.String header)
Section
with given header elementheader
- of this sectionSection.ModifiableHeaderSection createSection(java.lang.String header, java.util.List<PageEntry<?>> entries)
header
- of this sectionentries
- added to this sectionOnClickAction createOnClickActionAskPermission(java.lang.String androidPermission, android.app.Activity activity)
OnClickAction
used mainly for HoodAPI.createPropertyEntry(java.lang.CharSequence, at.favre.lib.hood.interfaces.values.DynamicValue<java.lang.String>, at.favre.lib.hood.interfaces.actions.OnClickAction, boolean)
type of entries.
This click action will open an runtime permission dialog if given permission was not granted or
the app info if it was or is blocked.androidPermission
- the permission as string, as defined in AndroidManifest.xml e.g. "android.permission.BLUETOOTH"activity
- the current activity as contextOnClickAction createOnClickActionStartIntent(android.content.Intent intent)
OnClickAction
used mainly for HoodAPI.createPropertyEntry(java.lang.CharSequence, at.favre.lib.hood.interfaces.values.DynamicValue<java.lang.String>, at.favre.lib.hood.interfaces.actions.OnClickAction, boolean)
type of entries.
This click action will start an activity with provided intent.intent
- will be used to start an activityOnClickAction createOnClickActionToast()
OnClickAction
used mainly for HoodAPI.createPropertyEntry(java.lang.CharSequence, at.favre.lib.hood.interfaces.values.DynamicValue<java.lang.String>, at.favre.lib.hood.interfaces.actions.OnClickAction, boolean)
type of entries.
This click action will show a toast message properties of the PageEntry
OnClickAction createOnClickActionDialog()
OnClickAction
used mainly for HoodAPI.createPropertyEntry(java.lang.CharSequence, at.favre.lib.hood.interfaces.values.DynamicValue<java.lang.String>, at.favre.lib.hood.interfaces.actions.OnClickAction, boolean)
type of entries.
This click action will show a dialog with properties of the PageEntry
java.lang.CharSequence createFullLabel(java.lang.CharSequence shortLabel, java.lang.CharSequence fullLabel)
HoodAPI.createPropertyEntry(java.lang.CharSequence, at.favre.lib.hood.interfaces.values.DynamicValue<java.lang.String>, at.favre.lib.hood.interfaces.actions.OnClickAction, boolean)
type of entries.shortLabel
- will be shown in the overviewfullLabel
- will be shown in a detail view (use createOnClickActionDialog()
ManagerControl registerShakeToOpenDebugActivity(android.content.Context ctx, android.content.Intent intent)
ctx
- intent
- to start when a shake is detectedandroid.view.View.OnTouchListener createArbitraryTapListener(int numOfTaps, android.view.View.OnClickListener onClickListener)
View.OnClickListener
or View.OnLongClickListener
on a view. Used with View.setOnTouchListener(View.OnTouchListener)
of a view.
Can be used to support "secret" tap method on semi-prominent views in your app to show a debug view. (e.g. triple tap on a text view)numOfTaps
- required to fire the underlying onClickListeneronClickListener
- will be called if the tap sequence was successful