diff --git a/src/android/customCamera/res/layout/activity_camera_view.xml b/src/android/customCamera/res/layout/activity_camera_view.xml
index 5a41113..4a8791b 100644
--- a/src/android/customCamera/res/layout/activity_camera_view.xml
+++ b/src/android/customCamera/res/layout/activity_camera_view.xml
@@ -13,7 +13,9 @@
+ android:layout_height="fill_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true" >
-
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:gravity="bottom" >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ android:max="7"
+ android:maxHeight="13dp"
+ android:minHeight="0dp"
+ android:progress="0"
+ android:progressDrawable="@drawable/custom_opacity_bar"
+ android:secondaryProgress="7"
+ android:thumb="@drawable/thumb"
+ android:thumbOffset="-0.9px" />
+
-
+
-
-
-
+
+
+
+
diff --git a/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java b/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java
index c7f9e41..391a150 100644
--- a/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java
+++ b/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java
@@ -11,6 +11,7 @@ import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.hardware.Camera;
+import android.hardware.Camera.Parameters;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.ShutterCallback;
import android.os.Bundle;
@@ -318,7 +319,6 @@ public class CameraActivity extends Activity {
*/
public void onPictureTaken(final byte[] data, Camera camera) {
// Show buttons to accept or decline the picture.
-
final LinearLayout keepPhoto = (LinearLayout) findViewById(R.id.keepPhoto);
keepPhoto.setVisibility(View.VISIBLE);
Button accept = (Button)findViewById(R.id.accept);
@@ -330,10 +330,22 @@ public class CameraActivity extends Activity {
// Put button miniature at the top of the page
final Button miniature = (Button)findViewById(R.id.miniature);
- final LayoutParams params = (RelativeLayout.LayoutParams)miniature.getLayoutParams();
- ((RelativeLayout.LayoutParams) params).addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
- ((RelativeLayout.LayoutParams) params).addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
+ final LayoutParams params = (LinearLayout.LayoutParams)miniature.getLayoutParams();
+ ((LinearLayout.LayoutParams) params).gravity = Gravity.TOP;
miniature.setLayoutParams(params);
+
+ try {
+ Camera.Parameters test = mCamera.getParameters();
+ test.setWhiteBalance(Parameters.WHITE_BALANCE_AUTO);
+ test.setSceneMode(Parameters.SCENE_MODE_AUTO);
+ int index = test.getExposureCompensation ();
+ // to set maximum Exposure
+ test.setExposureCompensation(test.getMaxExposureCompensation());
+
+ mCamera.setParameters(test);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
photoTaken = true;
@@ -375,8 +387,7 @@ public class CameraActivity extends Activity {
@Override
public void onClick(View v) {
photoTaken = false;
- ((RelativeLayout.LayoutParams) params).addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
- ((RelativeLayout.LayoutParams) params).addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
+ ((LinearLayout.LayoutParams) params).gravity = Gravity.BOTTOM;
miniature.setLayoutParams(params);
// If mode miniature and photo is declined, the miniature goes back to the bottom