mirror of
https://gitee.com/shuto/customCamera.git
synced 2026-05-02 00:07:24 +08:00
If we don't have a background image, disable miniature and opacity options since CameraLauncher.java.
This commit is contained in:
@@ -74,14 +74,21 @@ public class CameraLauncher extends CordovaPlugin {
|
||||
TransferBigData.setImgBackgroundBase64OtherOrientation(imgBackgroundBase64OtherOrientation);
|
||||
}
|
||||
|
||||
intent.putExtra("miniature", args.getBoolean(2));
|
||||
// If we don't have a background image, disable miniature and opacity options.
|
||||
if (TransferBigData.getImgBackgroundBase64() == null) {
|
||||
intent.putExtra("miniature", false);
|
||||
intent.putExtra("opacity", false);
|
||||
} else {
|
||||
intent.putExtra("miniature", args.getBoolean(2));
|
||||
intent.putExtra("opacity", args.getBoolean(7));
|
||||
}
|
||||
|
||||
intent.putExtra("saveInGallery", args.getBoolean(3));
|
||||
intent.putExtra("cameraBackgroundColor", args.getString(4));
|
||||
intent.putExtra("cameraBackgroundColorPressed", args.getString(5));
|
||||
if (args.getInt(6) >= 0 && args.getInt(6) <= 100) {
|
||||
intent.putExtra("quality", args.getInt(6));
|
||||
}
|
||||
intent.putExtra("opacity", args.getBoolean(7));
|
||||
intent.putExtra("startOrientation", this.cordova.getActivity().getResources().getConfiguration().orientation);
|
||||
|
||||
intent.putExtra("defaultFlash", args.getInt(8));
|
||||
|
||||
@@ -460,11 +460,6 @@ public class CameraActivity extends Activity {
|
||||
RelativeLayout.TRUE);
|
||||
|
||||
background.setLayoutParams(paramsMiniature);
|
||||
} else {
|
||||
Button miniature = (Button) findViewById(R.id.miniature);
|
||||
miniature.setVisibility(View.INVISIBLE);
|
||||
SeekBar switchOpacity = (SeekBar) findViewById(R.id.switchOpacity);
|
||||
switchOpacity.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user