Пример #1
0
 @Override
 protected void onResume() {
   super.onResume();
   Log.d(TAG, "onResume()");
   // Go ahead and unlock our group, so we can receive Observable events.
   observableGroup.unlock();
 }
Пример #2
0
 private void onClickLockUnlockGroup(View view) {
   if (isRunning) {
     if (isLocked) {
       Toast.makeText(this, "Group unlocked", Toast.LENGTH_SHORT).show();
       lockUnlock.setImageDrawable(unlockDrawable);
       observableGroup.unlock();
     } else {
       Toast.makeText(this, "Group locked", Toast.LENGTH_SHORT).show();
       lockUnlock.setImageDrawable(lockDrawable);
       observableGroup.lock();
     }
     isLocked = !isLocked;
   }
 }