public abstract class DropDownReceiver
extends android.content.BroadcastReceiver
Modifier and Type | Field and Description |
---|---|
static int |
DROPDOWN_STATE_FULLSCREEN |
static int |
DROPDOWN_STATE_NONE |
static int |
DROPDOWN_STATE_NORMAL |
static double |
FIVE_EIGTHS_HEIGHT |
static double |
FIVE_EIGTHS_WIDTH |
static double |
FIVE_TWELFTHS_HEIGHT |
static double |
FIVE_TWELFTHS_WIDTH |
static double |
FULL_HEIGHT |
static double |
FULL_WIDTH |
static double |
HALF_HEIGHT |
static double |
HALF_WIDTH |
static double |
HANDLE_THICKNESS_LANDSCAPE |
static double |
HANDLE_THICKNESS_PORTRAIT |
static double |
NO_HEIGHT |
static double |
NO_WIDTH |
static double |
QUARTER_SCREEN |
static double |
SEVEN_SIXTEENTH_WIDTH |
static double |
THIRD_HEIGHT |
static double |
THIRD_WIDTH |
static double |
THREE_EIGHTHS_HEIGHT |
static double |
THREE_EIGHTHS_WIDTH |
static double |
TWO_THIRDS_HEIGHT |
static double |
TWO_THIRDS_WIDTH |
Modifier | Constructor and Description |
---|---|
protected |
DropDownReceiver(MapView mapView) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_showDropDown()
To only be called by the DropDownManager
|
void |
callResize(double w,
double h) |
void |
closeDropDown()
Close the drop down for this Receiver.
|
void |
dispose()
Perform any cleanup activity prior to destruction.
|
protected abstract void |
disposeImpl()
Any drop down specific disposal implementation that is performed during the
disposal of a drop down.
|
protected void |
dropDownAlreadyExists()
Action to take when a dropdown is already open under the stack.
|
java.lang.String |
getAssociationKey()
Get the associated settings screen key
|
int |
getBackStackCount()
Because there is only one backstack per application we need to keep track
of the number each dropdown has.
|
DropDown |
getDropDown()
Get current DropDown.
|
MapView |
getMapView()
The content view for a MapActivity.
|
protected void |
hideDropDown() |
boolean |
isClosed()
Has the drop down been closed.
|
boolean |
isPortrait()
Returns true if the drop down receiver is being used in portrait mode.
|
boolean |
isRetained()
Should this drop down be maintained on the stack.
|
boolean |
isTablet()
Returns true if the drop down receiver is being used on a tablet.
|
boolean |
isTransient()
Check whether this drop-down is flagged as transient
See
setTransient(boolean) for more info |
boolean |
isVisible()
Check if the dropdown is showing.
|
protected boolean |
onBackButtonPressed()
For a dropdown that has told the drop down manager to ignore the back button.
|
protected void |
onStateRequested(int state)
Signal for a request by the handle.
|
protected void |
resize(double widthFraction,
double heightFraction)
Resize the dropdown and open the side pane to fit.
|
void |
setAssociationKey(java.lang.String key)
Sets the associated setting screen in the Tools section so if the settings
screen is open while this drop down receiver is open and in the foreground,
the associated setting screen will be opened.
|
void |
setRetain(boolean retain)
Should this drop down be maintained on the stack used in the
case of nested drop downs.
|
protected void |
setSelected(MapItem item) |
protected void |
setSelected(MapItem m,
java.lang.String icon)
Sets the icon to be used for the specified map item.
|
protected void |
setSelected(MapItem m,
java.lang.String icon,
boolean closeOnDelete)
In order to unify management of the concept of a selected icon within the
system, this will manage the selection lifecycle in accordance with the same
rules as a drop down.
|
void |
setTransient(boolean isTransient)
Flags the drop-down as transient to handle a number of specific cases:
-
DropDownManager.getTopDropDownKey() ignores this drop-down
- Opening this drop-down does not close other drop-downs
(even with setRetain(boolean) set to false ) |
void |
showDropDown(Fragment fragment,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction)
ignoreBackButton defaults to false. |
void |
showDropDown(Fragment fragment,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
boolean ignoreBackButton,
boolean switchable)
ignoreBackButton defaults to false. |
void |
showDropDown(Fragment fragment,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
boolean ignoreBackButton,
boolean switchable,
DropDown.OnStateListener stateListener)
Display the fragment in a side pane.
|
void |
showDropDown(Fragment fragment,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
DropDown.OnStateListener stateListener)
ignoreBackButton defaults to false. |
void |
showDropDown(android.view.View contentView,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction)
ignoreBackButton defaults to false. |
void |
showDropDown(android.view.View contentView,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
boolean ignoreBackButton)
Produces a dropdown with the ignoreBackButton set, but without a listener.
|
void |
showDropDown(android.view.View contentView,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
boolean ignoreBackButton,
boolean switchable,
DropDown.OnStateListener stateListener)
Display the view in a side pane.
|
void |
showDropDown(android.view.View contentView,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
boolean ignoreBackButton,
DropDown.OnStateListener stateListener)
Display the view in a side pane.
|
void |
showDropDown(android.view.View contentView,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
com.atakmap.android.dropdown.DropDown.DropDownSide side,
boolean ignoreBackButton,
boolean switchable,
DropDown.OnStateListener stateListener)
Display the view in a side pane.
|
void |
showDropDown(android.view.View contentView,
double lwFraction,
double lhFraction,
double pwFraction,
double phFraction,
DropDown.OnStateListener onCloseListener)
/**
ignoreBackButton defaults to false. |
protected void |
unhideDropDown() |
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, onReceive, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final double NO_WIDTH
public static final double FIVE_TWELFTHS_WIDTH
public static final double THIRD_WIDTH
public static final double THREE_EIGHTHS_WIDTH
public static final double SEVEN_SIXTEENTH_WIDTH
public static final double HALF_WIDTH
public static final double FIVE_EIGTHS_WIDTH
public static final double TWO_THIRDS_WIDTH
public static final double FULL_WIDTH
public static final double QUARTER_SCREEN
public static final double NO_HEIGHT
public static final double FIVE_TWELFTHS_HEIGHT
public static final double THIRD_HEIGHT
public static final double THREE_EIGHTHS_HEIGHT
public static final double HALF_HEIGHT
public static final double FIVE_EIGTHS_HEIGHT
public static final double TWO_THIRDS_HEIGHT
public static final double FULL_HEIGHT
public static final double HANDLE_THICKNESS_LANDSCAPE
public static final double HANDLE_THICKNESS_PORTRAIT
public static final int DROPDOWN_STATE_FULLSCREEN
public static final int DROPDOWN_STATE_NORMAL
public static final int DROPDOWN_STATE_NONE
protected DropDownReceiver(MapView mapView)
public final void dispose()
protected abstract void disposeImpl()
public void callResize(double w, double h)
public void showDropDown(android.view.View contentView, double lwFraction, double lhFraction, double pwFraction, double phFraction)
ignoreBackButton
defaults to false.DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(android.view.View contentView, double lwFraction, double lhFraction, double pwFraction, double phFraction, DropDown.OnStateListener onCloseListener)
ignoreBackButton
defaults to false.DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(android.view.View contentView, double lwFraction, double lhFraction, double pwFraction, double phFraction, boolean ignoreBackButton)
DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(android.view.View contentView, double lwFraction, double lhFraction, double pwFraction, double phFraction, boolean ignoreBackButton, DropDown.OnStateListener stateListener)
DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(android.view.View contentView, double lwFraction, double lhFraction, double pwFraction, double phFraction, boolean ignoreBackButton, boolean switchable, DropDown.OnStateListener stateListener)
DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(android.view.View contentView, double lwFraction, double lhFraction, double pwFraction, double phFraction, com.atakmap.android.dropdown.DropDown.DropDownSide side, boolean ignoreBackButton, boolean switchable, DropDown.OnStateListener stateListener)
contentView
- view to displaylwFraction
- fraction of the screen width-wise the view should take in landscape mode.lhFraction
- fraction of the screen height-wise the view should take in landscape mode.pwFraction
- fraction of the screen width-wise the view should take in portrait mode.phFraction
- fraction of the screen height-wise the view should take in portrait mode.side
- side to display the panel onignoreBackButton
- if true, side pane will not close on back button pressed.switchable
- if true, side pane can be switched from LEFT_SIDE to RIGHT_SIDE in the
presence of drop down that will ignore the back button.stateListener
- listens to drop down state changes.public void showDropDown(Fragment fragment, double lwFraction, double lhFraction, double pwFraction, double phFraction)
ignoreBackButton
defaults to false.DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(Fragment fragment, double lwFraction, double lhFraction, double pwFraction, double phFraction, DropDown.OnStateListener stateListener)
ignoreBackButton
defaults to false.DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(Fragment fragment, double lwFraction, double lhFraction, double pwFraction, double phFraction, boolean ignoreBackButton, boolean switchable)
ignoreBackButton
defaults to false.DropDownReceiver#showDropDown(Fragment, double, double, double, double, boolean, boolean, OnStateListener)
public void showDropDown(Fragment fragment, double lwFraction, double lhFraction, double pwFraction, double phFraction, boolean ignoreBackButton, boolean switchable, DropDown.OnStateListener stateListener)
fragment
- fragment to display.lwFraction
- fraction of the screen width-wise the fragment should take in landscape mode.lhFraction
- fraction of the screen height-wise the fragment should take in landscape mode.pwFraction
- fraction of the screen width-wise the fragment should take in portrait mode.phFraction
- fraction of the screen height-wise the fragment should take in portrait mode.ignoreBackButton
- if true, side pane will not close on back button pressed.stateListener
- listens to drop down state changes.public boolean isRetained()
public void setRetain(boolean retain)
public void setTransient(boolean isTransient)
DropDownManager.getTopDropDownKey()
ignores this drop-down
- Opening this drop-down does not close other drop-downs
(even with setRetain(boolean)
set to false
)isTransient
- True if this drop-down should be flagged as transientpublic boolean isTransient()
setTransient(boolean)
for more infopublic void setAssociationKey(java.lang.String key)
key
- Settings screen keypublic java.lang.String getAssociationKey()
protected boolean onBackButtonPressed()
protected void onStateRequested(int state)
state
- DROPDOWN_STATE_FULLSCREEN = 2;
DROPDOWN_STATE_NORMAL = 1;
DROPDOWN_STATE_NONE = 0;protected void dropDownAlreadyExists()
public final void closeDropDown()
protected void hideDropDown()
protected void unhideDropDown()
protected final boolean _showDropDown()
public final boolean isVisible()
public final boolean isClosed()
public final DropDown getDropDown()
public final MapView getMapView()
public int getBackStackCount()
public boolean isTablet()
public boolean isPortrait()
protected void resize(double widthFraction, double heightFraction)
widthFraction
- fraction of the screen width-wise the view should take.heightFraction
- fraction of the screen height-wise the view should take.protected void setSelected(MapItem m, java.lang.String icon, boolean closeOnDelete)
m
- the point map item to use as the selected icon.icon
- the location of the asset to use.closeOnDelete
- Close the drop-down when the selected item is deletedprotected void setSelected(MapItem m, java.lang.String icon)
m
- the map item to be selected.icon
- the string for the icon to be used.protected void setSelected(MapItem item)