Пример #1
0
  @Override
  protected void onResume() {
    super.onResume();

    // CameraManager must be initialized here, not in onCreate(). This is
    // necessary because we don't
    // want to open the camera driver and measure the screen size if we're
    // going to show the help on
    // first launch. That led to bugs where the scanning rectangle was the
    // wrong size and partially
    // off screen.
    cameraManager = new CameraManager(getApplication());

    handler = null;

    if (isHasSurface) {
      // The activity was paused but not stopped, so the surface still
      // exists. Therefore
      // surfaceCreated() won't be called, so init the camera here.
      initCamera(scanPreview.getHolder());
    } else {
      // Install the callback and wait for surfaceCreated() to init the
      // camera.
      scanPreview.getHolder().addCallback(this);
    }

    inactivityTimer.onResume();
  }
Пример #2
0
  @Override
  protected void onResume() {
    super.onResume();

    ScannerApplication application = this.getScannerApplication();
    application.incrementCurrentActivities();
  }
Пример #3
0
  @Override
  protected void onResume() {
    super.onResume();

    registerForContextMenu(listaIzvjestaj); // za meni nesto

    /*-----------SEARCH liste--------------*/
    inputSearch = (EditText) findViewById(R.id.inputSearch_report);
    inputSearch.addTextChangedListener(
        new TextWatcher() {

          @Override
          public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {
            // When user changed the Text
            PretragaIzvjestaja.this.adapter1.getFilter().filter(cs);
          }

          @Override
          public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
            // TODO Auto-generated method stub

          }

          @Override
          public void afterTextChanged(Editable arg0) {
            // TODO Auto-generated method stub
          }
        });
  }
Пример #4
0
  @Override
  protected void onResume() {
    super.onResume();
    active = true;

    setUpFilter();
  }
Пример #5
0
 @Override
 protected void onResume() {
   super.onResume();
   if (mGameView != null) {
     mGameView.resume();
   }
 }
Пример #6
0
 @Override
 protected void onResume() {
   super.onResume();
   if (mGoogleApiClient.isConnected() && mRequestingLocationUpdates) {
     TestManager.getInstance().startLocationUpdates();
   }
 }
Пример #7
0
 @Override
 protected void onResume() {
   super.onResume();
   // AppDetails and RepoDetailsActivity set different NFC actions, so reset here
   NfcHelper.setAndroidBeam(this, getApplication().getPackageName());
   checkForAddRepoIntent(getIntent());
 }
Пример #8
0
 @Override
 protected void onResume() {
   super.onResume();
   UserSharedPreference userSharedPreference = new UserSharedPreference(this);
   Bitmap bitmap = userSharedPreference.getUserPhotoBitmap();
   if (bitmap != null) mLeftMenuHeadIV.setImageBitmap(bitmap);
 }
Пример #9
0
 @Override
 protected void onResume() {
   super.onResume();
   IntentFilter filtro = new IntentFilter("corpex");
   filtro.setPriority(5); // si es con prioridad
   registerReceiver(mReceptor, filtro);
 }
Пример #10
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();
 }
Пример #11
0
 @Override
 protected void onResume() {
   super.onResume();
   if (SpUtils.contains(this, "max")) {
     maxScore.setText((int) SpUtils.get(this, "max", 0) + "");
   }
 }
  @Override
  protected void onResume() {
    super.onResume();

    enter.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            String text_user = user.getText().toString().trim();
            String text_pass = pass.getText().toString().trim();
            if (text_user.length() > 0 && text_pass.length() > 0) {
              Intent intent = new Intent(MainActivity.this, SegundoActivity.class);
              intent.putExtra("usuario", text_user);
              startActivity(intent);
            } else {
              Toast.makeText(
                      getApplicationContext(),
                      getResources().getString(R.string.mensaje_validacion),
                      Toast.LENGTH_SHORT)
                  .show();
            }
            //

          }
        });
  }
Пример #13
0
 @Override
 public void onResume() {
   super.onResume();
   if (mGoogleApiClient.isConnected() && !mRequestingLocationUpdates) {
     startLocationUpdates();
   }
 }
 @Override
 protected void onResume() {
   super.onResume();
   if (PreferenceManager.getInstance().getUseDarkTheme() != mDark) {
     restart();
   }
 }
 /** onResum */
 @Override
 protected void onResume() {
   /** Se llama cuando la actividad va a comenzar a interactuar con el usuario */
   super.onResume();
   sensorManager.registerListener(this, mStepCounterSensor, SensorManager.SENSOR_DELAY_FASTEST);
   sensorManager.registerListener(this, mStepDetectorSensor, SensorManager.SENSOR_DELAY_FASTEST);
 }
Пример #16
0
  @Override
  protected void onResume() {
    super.onResume();

    mSensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_UI);
    mSensorManager.registerListener(this, magnetometer, SensorManager.SENSOR_DELAY_UI);
  }
Пример #17
0
  @Override
  protected void onResume() {
    super.onResume();

    ListView listView = (ListView) findViewById(R.id.listview);
    StockPriceAdapter adapter = new StockPriceAdapter(this, idList, nameList, askList, bidList);
    listView.setAdapter(adapter);

    Switch prefSwitch1 = (Switch) findViewById(R.id.switch1);
    prefSwitch1.setChecked(preferences1.getBoolean("switch1", false));
    prefSwitch1.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            preferences1.edit().putBoolean("switch1", ((Switch) v).isChecked()).commit();
          }
        });

    Switch prefSwitch2 = (Switch) findViewById(R.id.switch2);
    prefSwitch2.setChecked(preferences2.getBoolean("switch2", false));
    prefSwitch2.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            preferences2.edit().putBoolean("switch2", ((Switch) v).isChecked()).commit();
          }
        });
  }
 @Override
 public void onResume() {
   List<Contact> allContacts = ContactDataSource.getAllContacts(this);
   adapter.updateList(allContacts);
   adapter.notifyDataSetChanged();
   super.onResume();
 }
Пример #19
0
 @Override
 protected void onResume() {
   super.onResume();
   if (receiverDownloadComplete != null) {
     registerReceiver(receiverDownloadComplete, intentFilter);
   }
 }
Пример #20
0
  @Override
  protected void onResume() {
    super.onResume();
    db4o.open();

    carregarFilmes();
  }
  @Override
  public void onResume() {
    super.onResume();
    ActivityMonitor.getInstance().setCurrentActivity(this);

    if (!(preferences.getEmail().equals("")
        || preferences.getPassword().equals("")
        || preferences.getDid().equals(""))) {
      preRecentUpdate();
    } else {
      AlertDialog.Builder builder = new AlertDialog.Builder(this);
      builder.setMessage(getString(R.string.conversations_first_run_dialog_text));
      builder.setPositiveButton(
          getString(R.string.preferences_name),
          new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
              Intent preferencesIntent =
                  new Intent(conversationsActivity, PreferencesActivity.class);
              startActivity(preferencesIntent);
            }
          });
      builder.setNegativeButton(
          getString(R.string.help_name),
          new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
              Intent helpIntent = new Intent(conversationsActivity, HelpActivity.class);
              startActivity(helpIntent);
            }
          });
      builder.setCancelable(false);
      builder.show();
    }
  }
Пример #22
0
 @Override
 public void onResume() {
   super.onResume();
   mViewPager.addOnPageChangeListener(mOnPageChangeListener);
   mViewPager.addOnAdapterChangeListener(mOnAdapterChangeListener);
   LocalBroadcastManager.getInstance(this).registerReceiver(mResultsReceiver, mIntentFilter);
 }
Пример #23
0
 @Override
 public void onResume() {
   super.onResume();
   mView1.setVisibility(View.INVISIBLE);
   mView2.setVisibility(View.INVISIBLE);
   mView3.setVisibility(View.INVISIBLE);
 }
Пример #24
0
 @Override
 protected void onResume() {
   Log.d(TAG + "Cycle", "Called the onResume method for " + TAG);
   resetText();
   super.onResume();
   // The activity has become visible (it is now "resumed").
 }
Пример #25
0
 @Override
 protected void onResume() {
   super.onResume();
   Log.d(TAG, "onResume() called with: " + "");
   registerReceiver(
       mNetworkStateChangedReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
 }
  @Override
  protected void onResume() {
    super.onResume();

    // CameraManager必须在这里初始化,而不是在onCreate()中。
    // 这是必须的,因为当我们第一次进入时需要显示帮助页,我们并不想打开Camera,测量屏幕大小
    // 当扫描框的尺寸不正确时会出现bug
    cameraManager = new CameraManager(getApplication());

    viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
    viewfinderView.setCameraManager(cameraManager);

    handler = null;

    SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
    SurfaceHolder surfaceHolder = surfaceView.getHolder();
    if (hasSurface) {
      // activity在paused时但不会stopped,因此surface仍旧存在;
      // surfaceCreated()不会调用,因此在这里初始化camera
      initCamera(surfaceHolder);
    } else {
      // 重置callback,等待surfaceCreated()来初始化camera
      surfaceHolder.addCallback(this);
    }

    beepManager.updatePrefs();
    inactivityTimer.onResume();

    source = IntentSource.NONE;
    decodeFormats = null;
    characterSet = null;
  }
 @Override
 protected void onResume() {
   initLastName();
   initFirstName();
   initPhoneNumber();
   super.onResume();
 }
Пример #28
0
  // on recognition of nfc event
  @Override
  protected void onResume() {
    super.onResume();
    Intent intent = getIntent();
    // appendTotal();

    // initialize gesture detector, for swipe
    // gestureDetector = new GestureDetector(this, new SwipeGestureDetector());

    if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) {
      Parcelable[] rawMessages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);

      NdefMessage message = (NdefMessage) rawMessages[0]; // only one message transferred
      String amount = new String(message.getRecords()[0].getPayload());

      // showBalance.setText("125");
      // showBalance.setVisibility(View.INVISIBLE); //REMOVE FOR FRIENDSHIP

      appendTotal();
      // showBalance.setText("1225");

      /*Intent intentt = new Intent(this, OpenCamera.class);
      startActivity(intentt);*/
    }
  }
Пример #29
0
  @Override
  protected void onResume() {
    super.onResume();

    // Making the random trending frame refreshed everytime when the user comes back to main.
    populateTrendingFrame();
  }
Пример #30
0
 @Override
 protected void onResume() {
   super.onResume();
   //
   //        // Logs 'install' and 'app activate' App Events.
   //        AppEventsLogger.activateApp(this);
 }