Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12 from michaelorbotix/master
Browse files Browse the repository at this point in the history
Updated for Version 1.4.1 Release
  • Loading branch information
michaelorbotix committed Dec 12, 2012
2 parents b4c9008 + 97fb8c0 commit d012b20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions samples/UISample/src/orbotix/uisample/UiSampleActivity.java
Expand Up @@ -35,6 +35,7 @@ public class UiSampleActivity extends ControllerActivity
* ID to start the ColorPickerActivity for result to select a color
*/
private final static int COLOR_PICKER_ACTIVITY = 1;
private boolean mColorPickerShowing = false;

/**
* The Robot to control
Expand Down Expand Up @@ -179,6 +180,10 @@ public void onBluetoothNotEnabled() {
@Override
protected void onResume() {
super.onResume();
if( mColorPickerShowing ) {
mColorPickerShowing = false;
return;
}
// Refresh list of Spheros
mSpheroConnectionView.showSpheros();
}
Expand All @@ -189,6 +194,7 @@ protected void onResume() {
@Override
protected void onPause() {
super.onPause();
if( mColorPickerShowing ) return;
// Disconnect Robot properly
RobotProvider.getDefaultProvider().disconnectControlledRobots();
}
Expand Down Expand Up @@ -240,6 +246,7 @@ else if( requestCode == BLUETOOTH_SETTINGS_REQUEST ) {
*/
public void onColorClick(View v){

mColorPickerShowing = true;
Intent i = new Intent(this, ColorPickerActivity.class);

//Tell the ColorPickerActivity which color to have the cursor on.
Expand Down

0 comments on commit d012b20

Please sign in to comment.