mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-cordova-android
This commit is contained in:
commit
c9d4276207
@ -108,16 +108,12 @@ public class CameraLauncher extends Plugin {
|
|||||||
this.mediaType = PICTURE;
|
this.mediaType = PICTURE;
|
||||||
this.mQuality = 80;
|
this.mQuality = 80;
|
||||||
|
|
||||||
JSONObject options = args.optJSONObject(0);
|
this.mQuality = args.getInt(0);
|
||||||
if (options != null) {
|
destType = args.getInt(1);
|
||||||
srcType = options.getInt("sourceType");
|
srcType = args.getInt(2);
|
||||||
destType = options.getInt("destinationType");
|
this.targetWidth = args.getInt(3);
|
||||||
this.targetHeight = options.getInt("targetHeight");
|
this.targetHeight = args.getInt(4);
|
||||||
this.targetWidth = options.getInt("targetWidth");
|
this.encodingType = args.getInt(5);
|
||||||
this.encodingType = options.getInt("encodingType");
|
|
||||||
this.mediaType = options.getInt("mediaType");
|
|
||||||
this.mQuality = options.getInt("quality");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (srcType == CAMERA) {
|
if (srcType == CAMERA) {
|
||||||
this.takePicture(destType, encodingType);
|
this.takePicture(destType, encodingType);
|
||||||
|
@ -87,13 +87,13 @@ public class LinearLayoutSoftKeyboardDetect extends LinearLayout {
|
|||||||
// gone away.
|
// gone away.
|
||||||
else if (height > oldHeight) {
|
else if (height > oldHeight) {
|
||||||
if(app != null)
|
if(app != null)
|
||||||
app.sendJavascript("Cordova.fireDocumentEvent('hidekeyboard');");
|
app.sendJavascript("require('cordova').fireDocumentEvent('hidekeyboard');");
|
||||||
}
|
}
|
||||||
// If the height as gotten smaller then we will assume the soft keyboard has
|
// If the height as gotten smaller then we will assume the soft keyboard has
|
||||||
// been displayed.
|
// been displayed.
|
||||||
else if (height < oldHeight) {
|
else if (height < oldHeight) {
|
||||||
if(app != null)
|
if(app != null)
|
||||||
app.sendJavascript("Cordova.fireDocumentEvent('showkeyboard');");
|
app.sendJavascript("require('cordova').fireDocumentEvent('showkeyboard');");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the old height for the next event
|
// Update the old height for the next event
|
||||||
|
Loading…
Reference in New Issue
Block a user