Пример #1
0
 public void refreshQuickControl() {
   if (this.quickControlView != null) {
     int icon_id = this.getQuickControlIconID();
     Drawable icon = MainScreen.getMainContext().getResources().getDrawable(icon_id);
     ((ImageView) this.quickControlView.findViewById(R.id.imageView)).setImageDrawable(icon);
   }
 }
Пример #2
0
  // Used only in old camera interface (HALv3 don't use it)
  public void setCameraPictureSize() {
    Camera camera = CameraController.getCamera();
    if (null == camera) return;

    SharedPreferences prefs =
        PreferenceManager.getDefaultSharedPreferences(MainScreen.getMainContext());
    int jpegQuality = Integer.parseInt(prefs.getString(MainScreen.sJPEGQualityPref, "95"));

    Camera.Parameters cp = CameraController.getInstance().getCameraParameters();
    cp.setPictureSize(MainScreen.getImageWidth(), MainScreen.getImageHeight());
    cp.setJpegQuality(jpegQuality);
    try {
      CameraController.getInstance().setCameraParameters(cp);
    } catch (RuntimeException e) {
      Log.e("CameraTest", "MainScreen.setupCamera unable setParameters " + e.getMessage());
    }
  }