public class NightVisionReceiver
extends android.content.BroadcastReceiver
implements android.widget.SeekBar.OnSeekBarChangeListener
| Modifier and Type | Field and Description |
|---|---|
protected android.widget.PopupWindow |
_controlWindow |
protected com.atakmap.android.nightvision.NightVisionReceiver.HideControlAction |
_hideControlAction |
static java.lang.String |
ADJUST_NIGHT_VISION_VALUE |
static java.lang.String |
GET_DIM_VALUE |
static NightVisionReceiver |
instance |
static int |
MAX_NV_DIM |
static java.lang.String |
UPDATE_DIM_VALUE |
| Constructor and Description |
|---|
NightVisionReceiver(MapView mapview) |
| Modifier and Type | Method and Description |
|---|---|
static float |
convertSliderToDim(int progress)
converts the seekbar progress to a dim value from 0.0-.90f
this is the value we used to store the dim value and set the window
parameter to this dim value
|
void |
getValue()
Returns the value stored for the current user saved dim value
|
void |
handleChangesInDim(float change)
Stops and creates the service when changing the dim value
by sending a intent into the service and updating the view attachment
|
void |
hideControl()
removes the control window which
houses the seekbar from view of the mapview
|
void |
onDestroy() |
void |
onProgressChanged(android.widget.SeekBar seekBar,
int progress,
boolean fromUser) |
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
void |
onStartTrackingTouch(android.widget.SeekBar seekBar) |
void |
onStopTrackingTouch(android.widget.SeekBar seekBar) |
protected void |
resetHideTimer() |
protected void |
startHideTimer()
starts the runnable hide timer when a user
stops tracking on the seekbar
|
protected void |
stopHideTimer()
nullifies the runnable hide timer
|
void |
writeValue(float value)
writes the value dim file using the supplied float value
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtraspublic static final java.lang.String ADJUST_NIGHT_VISION_VALUE
public static final java.lang.String UPDATE_DIM_VALUE
public static final java.lang.String GET_DIM_VALUE
protected android.widget.PopupWindow _controlWindow
protected com.atakmap.android.nightvision.NightVisionReceiver.HideControlAction _hideControlAction
public static final int MAX_NV_DIM
public static NightVisionReceiver instance
public NightVisionReceiver(MapView mapview)
public void onReceive(android.content.Context context,
android.content.Intent intent)
onReceive in class android.content.BroadcastReceiverpublic void writeValue(float value)
value - change the current dim valuepublic void getValue()
public static float convertSliderToDim(int progress)
progress - the progress bar for the dim valuepublic void onStopTrackingTouch(android.widget.SeekBar seekBar)
onStopTrackingTouch in interface android.widget.SeekBar.OnSeekBarChangeListenerpublic void onStartTrackingTouch(android.widget.SeekBar seekBar)
onStartTrackingTouch in interface android.widget.SeekBar.OnSeekBarChangeListenerpublic void onProgressChanged(android.widget.SeekBar seekBar,
int progress,
boolean fromUser)
onProgressChanged in interface android.widget.SeekBar.OnSeekBarChangeListenerpublic void handleChangesInDim(float change)
public void hideControl()
protected void stopHideTimer()
protected void startHideTimer()
protected void resetHideTimer()
public void onDestroy()