9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-05-02 00:07:24 +08:00

Merge branch 'transform-to-plugin'

Conflicts:
	src/android/customCamera/res/layout/activity_camera_view.xml
	src/android/customCamera/src/org/geneanet/customcamera/CameraView.java
	src/android/customCamera/src/org/geneanet/customcamera/MainActivity.java
This commit is contained in:
Christophe Boucaut
2014-11-14 16:26:38 +01:00
62 changed files with 278 additions and 26 deletions
+18
View File
@@ -0,0 +1,18 @@
package org.geneanet.customcamera;
import XXX_NAME_CURRENT_PACKAGE_XXX.CameraView;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CallbackContext;
import org.json.JSONArray;
import org.json.JSONException;
import android.content.Intent;
public class CameraLauncher extends CordovaPlugin {
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
Intent intent = new Intent(this.cordova.getActivity(), CameraView.class);
cordova.getActivity().startActivity(intent);
return true;
}
}
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.geneanet.testcustomcamera"
package="org.geneanet.customcamera"
android:versionCode="1"
android:versionName="1.0" >

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

@@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-14
target=android-16

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before

Width:  |  Height:  |  Size: 802 KiB

After

Width:  |  Height:  |  Size: 802 KiB

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before

Width:  |  Height:  |  Size: 802 KiB

After

Width:  |  Height:  |  Size: 802 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before

Width:  |  Height:  |  Size: 802 KiB

After

Width:  |  Height:  |  Size: 802 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 343 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Before

Width:  |  Height:  |  Size: 802 KiB

After

Width:  |  Height:  |  Size: 802 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

@@ -27,7 +27,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:alpha="0.2"
android:contentDescription="@string/descImage"
android:scaleType="fitXY"
android:src="@drawable/normal" />
@@ -36,7 +35,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:alpha="0"
android:contentDescription="@string/descImage"
android:scaleType="fitXY"
android:src="@drawable/colorise" />
@@ -45,7 +43,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:alpha="0"
android:contentDescription="@string/descImage"
android:rotation="90"
android:src="@drawable/paysage" />
@@ -54,7 +51,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:alpha="0"
android:contentDescription="@string/descImage"
android:rotation="90"
android:src="@drawable/couthenans" />
@@ -63,7 +59,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:alpha="0"
android:contentDescription="@string/descImage"
android:rotation="90"
android:src="@drawable/hericourt" />
@@ -86,7 +81,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:contentDescription="@string/BoutonMiniature"
android:onClick="showMiniature"
android:text="@string/Miniature" />
@@ -99,7 +93,7 @@
android:minWidth="0dp"
android:text="@string/PHOTO" />
<org.geneanet.customcamera.utils.VerticalSeekBar
<org.geneanet.customcamera.VerticalSeekBar
android:id="@+id/switchOpacity"
android:layout_width="wrap_content"
android:layout_height="300dp"
@@ -4,7 +4,7 @@
<string name="app_name">TestCustomCamera</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="title_activity_camera_view">CameraView</string>
<string name="title_activity_camera_view">CameraViewNative</string>
<string name="start_custom_camera">Start Custom Camera</string>
<string name="capture">Capture</string>
<string name="todo">TODO</string>
@@ -1,4 +1,4 @@
package org.geneanet.customcamera.utils;
package org.geneanet.customcamera;
import java.io.IOException;
@@ -1,22 +1,16 @@
package org.geneanet.customcamera;
import org.geneanet.customcamera.*;
import java.util.List;
import java.lang.Math;
import org.geneanet.customcamera.utils.CameraPreview;
import org.geneanet.customcamera.utils.CustomCamera;
import org.geneanet.testcustomcamera.R;
import android.app.Activity;
import android.hardware.Camera;
import android.hardware.Camera.Parameters;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
@@ -50,7 +44,7 @@ public class CameraView extends Activity {
/* Remove notification bar */
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_camera_view);
/* Get informations about the device */
@@ -274,4 +268,4 @@ public class CameraView extends Activity {
// mPreview.getHolder().removeCallback(mPreview);
System.out.println("onResume -> test ");
}
}
}
@@ -1,4 +1,4 @@
package org.geneanet.customcamera.utils;
package org.geneanet.customcamera;
import android.hardware.Camera;
@@ -1,6 +1,6 @@
package org.geneanet.customcamera;
import org.geneanet.testcustomcamera.R;
import org.geneanet.customcamera.R;
import android.app.Activity;
import android.content.Context;
@@ -1,4 +1,4 @@
package org.geneanet.customcamera.utils;
package org.geneanet.customcamera;
import android.content.Context;
import android.graphics.Canvas;