public class ActionBarReceiver extends android.content.BroadcastReceiver implements NavButtonsVisibilityListener
Modifier and Type | Field and Description |
---|---|
static int |
ActionItemPaddingLR |
static int |
ActionItemPaddingTB |
static java.lang.String |
ADD_NEW_TOOL |
static java.lang.String |
ADD_NEW_TOOLS |
static java.lang.String |
DISABLE_ACTIONBAR |
static java.lang.String |
DISABLE_ACTIONBAR_DEFAULT_REASON |
static java.lang.String |
LAYOUT_MGR |
protected static android.app.Activity |
mActivity |
static int |
QuerySpec |
static java.lang.String |
QUIT_TOOL |
static java.lang.String |
REFRESH_ACTION_BAR |
static java.lang.String |
RELOAD_ACTION_BAR |
static java.lang.String |
REMOVE_TOOLS |
static float |
SCALE_FACTOR |
static java.lang.String |
SETTINGS_TOOL |
static java.lang.String |
TOGGLE_ACTIONBAR |
Constructor and Description |
---|
ActionBarReceiver(android.app.Activity activity) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
int |
getActionBarColor()
Finds the selected saved color value from the preferences
parses the color and apply a 99% alpha to allow for transparency under the action bar
if parsing fails , default original action bar is used
|
AtakActionBarListData |
getActionBars() |
static ActionBarReceiver |
getInstance()
Get an instance of the receiver.
|
static ActionMenuData |
getMenuItem(java.lang.String name)
Deprecated.
No longer used and will always return null - see
NavView |
static android.graphics.drawable.Drawable |
getScaledIcon(android.content.Context context,
boolean bLargeIcons,
android.graphics.drawable.Drawable icon,
boolean cache)
Deprecated.
|
ActionBarView |
getToolView() |
static int |
getUserIconColor()
Grabs the user defined string color from settings
See: CustomActionBarFragment
|
boolean |
hasActionBars() |
boolean |
isDisabled()
Deprecated.
|
void |
onNavButtonsVisible(boolean visible)
Called when the top-left nav buttons have been turned on or off
|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
static void |
setPadding(android.widget.ImageView actionView,
android.util.DisplayMetrics metrics) |
void |
setToolView(ActionBarView v) |
void |
setToolView(ActionBarView v,
boolean endTool)
Provided an ActionBarView, show the tool as embedded and with an x to close the tool.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static java.lang.String SETTINGS_TOOL
public static java.lang.String LAYOUT_MGR
public static java.lang.String QUIT_TOOL
public static final float SCALE_FACTOR
public static final int QuerySpec
public static final int ActionItemPaddingLR
public static final int ActionItemPaddingTB
public static final java.lang.String RELOAD_ACTION_BAR
public static final java.lang.String ADD_NEW_TOOL
public static final java.lang.String ADD_NEW_TOOLS
public static final java.lang.String REMOVE_TOOLS
public static final java.lang.String REFRESH_ACTION_BAR
public static final java.lang.String DISABLE_ACTIONBAR
public static final java.lang.String TOGGLE_ACTIONBAR
public static final java.lang.String DISABLE_ACTIONBAR_DEFAULT_REASON
protected static android.app.Activity mActivity
@Deprecated public static ActionMenuData getMenuItem(java.lang.String name)
NavView
public static ActionBarReceiver getInstance()
public void setToolView(ActionBarView v, boolean endTool)
v
- the action bar view to show.endTool
- Whether to send out an UNSET_TOOLBAR (end tool) intent when v is nullpublic void setToolView(ActionBarView v)
public ActionBarView getToolView()
public boolean hasActionBars()
public AtakActionBarListData getActionBars()
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public void dispose()
public static void setPadding(android.widget.ImageView actionView, android.util.DisplayMetrics metrics)
@Deprecated public static android.graphics.drawable.Drawable getScaledIcon(android.content.Context context, boolean bLargeIcons, android.graphics.drawable.Drawable icon, boolean cache)
@Deprecated public boolean isDisabled()
public static int getUserIconColor()
public int getActionBarColor()
public void onNavButtonsVisible(boolean visible)
NavButtonsVisibilityListener
onNavButtonsVisible
in interface NavButtonsVisibilityListener
visible
- True if buttons visible