public abstract class EditActivity
extends ThemedActivity
EditActivity
is a base class that provides support for various configuration
editing activities.Modifier and Type | Class and Description |
---|---|
protected class |
EditActivity.ConfigurationTypeAndDisplayName |
protected static class |
EditActivity.DisplayNameAndInteger |
protected static class |
EditActivity.DisplayNameAndRequestCode |
protected class |
EditActivity.SetNameTextWatcher |
Modifier and Type | Field and Description |
---|---|
protected AppUtil |
appUtil |
protected ConfigurationUtility |
configurationUtility |
protected Context |
context |
protected ControllerConfiguration |
controllerConfiguration |
protected RobotConfigFile |
currentCfgFile |
protected java.util.List<RobotConfigFile> |
extantRobotConfigurations |
protected boolean |
haveRobotConfigMapParameter |
protected int |
idAddButton |
protected int |
idFixButton |
protected int |
idSwapButton |
protected boolean |
remoteConfigure |
protected RobotConfigFileManager |
robotConfigFileManager |
protected RobotConfigMap |
robotConfigMap |
protected ScannedDevices |
scannedDevices |
protected AdapterView.OnItemSelectedListener |
spinnerListener
The listener that controls the behavior when an item in the spinner is selected.
|
static java.lang.String |
TAG |
protected Utility |
utility |
Constructor and Description |
---|
EditActivity() |
Modifier and Type | Method and Description |
---|---|
protected void |
changeDevice(View itemView,
ConfigurationType type) |
protected void |
clearDevice(View itemView) |
protected void |
clearNameIfNecessary(EditText nameText,
DeviceConfiguration device)
This gets called if we're changing a device, so if the nametext was "NO DEVICE ATTACHED",
it should now be empty for editing.
|
protected void |
deserialize(EditParameters parameters) |
protected void |
deserializeConfigMap(EditParameters parameters) |
java.lang.String |
disabledDeviceName() |
java.lang.String |
displayNameOfConfigurationType(ConfigurationType.DisplayNameFlavor flavor,
ConfigurationType type) |
protected int |
findPosition(Spinner spinner,
ConfigurationType type) |
protected int |
findPosition(Spinner spinner,
ConfigurationType typeA,
ConfigurationType typeB) |
protected void |
finishCancel() |
protected void |
finishOk() |
protected void |
finishOk(EditParameters parameters) |
protected void |
finishOk(Intent intent) |
static java.lang.String |
formatSerialNumber(Context context,
ControllerConfiguration controllerConfiguration) |
protected ConfigurationType |
getDefaultEnabledSelection() |
protected RobotConfigMap |
getRobotConfigMap() |
java.lang.String |
getTag() |
protected CallbackResult |
handleCommandNotifyActiveConfig(java.lang.String extra)
When doing remote config and we get notice that the config has changed, we need to
update our header string contents and attendant red vs grey etc coloring
|
protected void |
handleLaunchEdit(RequestCode requestCode,
java.lang.Class launchClass,
DeviceConfiguration config) |
protected void |
handleLaunchEdit(RequestCode requestCode,
java.lang.Class launchClass,
EditParameters parameters) |
protected void |
handleLaunchEdit(RequestCode requestCode,
java.lang.Class launchClass,
java.util.List<DeviceConfiguration> currentItems) |
protected void |
handleSpinner(View view,
int spinnerId,
DeviceConfiguration deviceConfiguration) |
protected void |
handleSpinner(View view,
int spinnerId,
DeviceConfiguration deviceConfiguration,
boolean forceFind) |
protected void |
localizeConfigTypeSpinner(ConfigurationType.DisplayNameFlavor flavor,
Spinner spinner) |
protected void |
localizeConfigTypeSpinnerStrings(ConfigurationType.DisplayNameFlavor flavor,
Spinner spinner,
java.util.List<java.lang.String> strings) |
protected void |
localizeConfigTypeSpinnerTypes(ConfigurationType.DisplayNameFlavor flavor,
Spinner spinner,
java.util.List<ConfigurationType> types) |
protected void |
logActivityResult(int requestCodeValue,
int resultCode,
Intent data) |
protected void |
logBackPressed() |
java.lang.String |
nameOf(DeviceConfiguration config) |
java.lang.String |
nameOf(java.lang.String name) |
void |
onBackPressed() |
protected void |
onCreate(Bundle savedInstanceState) |
protected void |
onStart() |
protected void |
sendOrInject(Command cmd) |
public static final java.lang.String TAG
protected Context context
protected AppUtil appUtil
protected boolean remoteConfigure
protected Utility utility
protected ConfigurationUtility configurationUtility
protected RobotConfigFileManager robotConfigFileManager
protected RobotConfigFile currentCfgFile
protected int idAddButton
protected int idFixButton
protected int idSwapButton
protected ControllerConfiguration controllerConfiguration
protected RobotConfigMap robotConfigMap
protected boolean haveRobotConfigMapParameter
protected ScannedDevices scannedDevices
protected java.util.List<RobotConfigFile> extantRobotConfigurations
protected AdapterView.OnItemSelectedListener spinnerListener
public java.lang.String getTag()
protected void onCreate(Bundle savedInstanceState)
protected void onStart()
protected void deserialize(EditParameters parameters)
protected void deserializeConfigMap(EditParameters parameters)
protected RobotConfigMap getRobotConfigMap()
protected void handleLaunchEdit(RequestCode requestCode, java.lang.Class launchClass, java.util.List<DeviceConfiguration> currentItems)
protected void handleLaunchEdit(RequestCode requestCode, java.lang.Class launchClass, DeviceConfiguration config)
protected void handleLaunchEdit(RequestCode requestCode, java.lang.Class launchClass, EditParameters parameters)
public static java.lang.String formatSerialNumber(Context context, ControllerConfiguration controllerConfiguration)
protected void finishCancel()
protected void finishOk(EditParameters parameters)
protected void finishOk()
protected void finishOk(Intent intent)
public void onBackPressed()
protected void logActivityResult(int requestCodeValue, int resultCode, Intent data)
protected void logBackPressed()
protected void clearNameIfNecessary(EditText nameText, DeviceConfiguration device)
nameText
- - the name field that may need to be "cleared"device
- - the modulepublic java.lang.String disabledDeviceName()
public java.lang.String nameOf(DeviceConfiguration config)
public java.lang.String nameOf(java.lang.String name)
public java.lang.String displayNameOfConfigurationType(ConfigurationType.DisplayNameFlavor flavor, ConfigurationType type)
protected void localizeConfigTypeSpinner(ConfigurationType.DisplayNameFlavor flavor, Spinner spinner)
protected void localizeConfigTypeSpinnerStrings(ConfigurationType.DisplayNameFlavor flavor, Spinner spinner, java.util.List<java.lang.String> strings)
protected void localizeConfigTypeSpinnerTypes(ConfigurationType.DisplayNameFlavor flavor, Spinner spinner, java.util.List<ConfigurationType> types)
protected int findPosition(Spinner spinner, ConfigurationType type)
protected int findPosition(Spinner spinner, ConfigurationType typeA, ConfigurationType typeB)
protected void handleSpinner(View view, int spinnerId, DeviceConfiguration deviceConfiguration)
protected void handleSpinner(View view, int spinnerId, DeviceConfiguration deviceConfiguration, boolean forceFind)
protected ConfigurationType getDefaultEnabledSelection()
protected void clearDevice(View itemView)
protected void changeDevice(View itemView, ConfigurationType type)
protected void sendOrInject(Command cmd)
protected CallbackResult handleCommandNotifyActiveConfig(java.lang.String extra)