diff --git a/res/translations.json b/res/translations.json
index 5fd127c..50e892c 100644
--- a/res/translations.json
+++ b/res/translations.json
@@ -3,7 +3,9 @@
"miniature": "Miniature",
"capture": "Capture",
"acceptePicture": "Valid the picture",
- "declinePicture": "Decline the picture"
+ "declinePicture": "Decline the picture",
+ "zoomMin": "-",
+ "zoomMax": "+"
},
"fr": {
"miniature": "Miniature",
diff --git a/src/android/customCamera/res/drawable-hdpi/accept.png b/src/android/customCamera/res/drawable-hdpi/accept.png
index 2132a9b..974ce49 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/accept.png and b/src/android/customCamera/res/drawable-hdpi/accept.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/back.png b/src/android/customCamera/res/drawable-hdpi/back.png
new file mode 100644
index 0000000..f6ec565
Binary files /dev/null and b/src/android/customCamera/res/drawable-hdpi/back.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/capture.png b/src/android/customCamera/res/drawable-hdpi/capture.png
index 020a772..4980cb2 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/capture.png and b/src/android/customCamera/res/drawable-hdpi/capture.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/custom_seekbar.xml b/src/android/customCamera/res/drawable-hdpi/custom_seekbar.xml
new file mode 100644
index 0000000..68604f0
--- /dev/null
+++ b/src/android/customCamera/res/drawable-hdpi/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable-hdpi/delete.png b/src/android/customCamera/res/drawable-hdpi/delete.png
index cea182e..49e6def 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/delete.png and b/src/android/customCamera/res/drawable-hdpi/delete.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/flash.png b/src/android/customCamera/res/drawable-hdpi/flash.png
index 9d408d4..6097299 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/flash.png and b/src/android/customCamera/res/drawable-hdpi/flash.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/flash_auto.png b/src/android/customCamera/res/drawable-hdpi/flash_auto.png
index cb342f4..8bf49fa 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/flash_auto.png and b/src/android/customCamera/res/drawable-hdpi/flash_auto.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/maximise.png b/src/android/customCamera/res/drawable-hdpi/maximise.png
new file mode 100644
index 0000000..ba44a72
Binary files /dev/null and b/src/android/customCamera/res/drawable-hdpi/maximise.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/minimise.png b/src/android/customCamera/res/drawable-hdpi/minimise.png
new file mode 100644
index 0000000..b98eebd
Binary files /dev/null and b/src/android/customCamera/res/drawable-hdpi/minimise.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/no_flash.png b/src/android/customCamera/res/drawable-hdpi/no_flash.png
index 037c36e..3ebf0e5 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/no_flash.png and b/src/android/customCamera/res/drawable-hdpi/no_flash.png differ
diff --git a/src/android/customCamera/res/drawable-hdpi/switch_camera.png b/src/android/customCamera/res/drawable-hdpi/switch_camera.png
index 7a69823..f63d8cc 100644
Binary files a/src/android/customCamera/res/drawable-hdpi/switch_camera.png and b/src/android/customCamera/res/drawable-hdpi/switch_camera.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/accept.png b/src/android/customCamera/res/drawable-ldpi/accept.png
new file mode 100644
index 0000000..63100bc
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/accept.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/back.png b/src/android/customCamera/res/drawable-ldpi/back.png
new file mode 100644
index 0000000..9222f5e
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/back.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/capture.png b/src/android/customCamera/res/drawable-ldpi/capture.png
index f489d86..51997d1 100644
Binary files a/src/android/customCamera/res/drawable-ldpi/capture.png and b/src/android/customCamera/res/drawable-ldpi/capture.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/custom_seekbar.xml b/src/android/customCamera/res/drawable-ldpi/custom_seekbar.xml
new file mode 100644
index 0000000..a877d92
--- /dev/null
+++ b/src/android/customCamera/res/drawable-ldpi/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable-ldpi/delete.png b/src/android/customCamera/res/drawable-ldpi/delete.png
new file mode 100644
index 0000000..72b34ea
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/delete.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/flash.png b/src/android/customCamera/res/drawable-ldpi/flash.png
new file mode 100644
index 0000000..4cc553d
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/flash.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/flash_auto.png b/src/android/customCamera/res/drawable-ldpi/flash_auto.png
new file mode 100644
index 0000000..78a61fc
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/flash_auto.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/maximise.png b/src/android/customCamera/res/drawable-ldpi/maximise.png
new file mode 100644
index 0000000..659d134
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/maximise.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/minimise.png b/src/android/customCamera/res/drawable-ldpi/minimise.png
new file mode 100644
index 0000000..ee40fb9
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/minimise.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/no_flash.png b/src/android/customCamera/res/drawable-ldpi/no_flash.png
new file mode 100644
index 0000000..8ce80d2
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/no_flash.png differ
diff --git a/src/android/customCamera/res/drawable-ldpi/switch_camera.png b/src/android/customCamera/res/drawable-ldpi/switch_camera.png
new file mode 100644
index 0000000..df27b48
Binary files /dev/null and b/src/android/customCamera/res/drawable-ldpi/switch_camera.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/accept.png b/src/android/customCamera/res/drawable-mdpi/accept.png
new file mode 100644
index 0000000..60d3b37
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/accept.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/back.png b/src/android/customCamera/res/drawable-mdpi/back.png
new file mode 100644
index 0000000..ca5b50e
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/back.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/capture.png b/src/android/customCamera/res/drawable-mdpi/capture.png
index 5e16088..092224f 100644
Binary files a/src/android/customCamera/res/drawable-mdpi/capture.png and b/src/android/customCamera/res/drawable-mdpi/capture.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/custom_seekbar.xml b/src/android/customCamera/res/drawable-mdpi/custom_seekbar.xml
new file mode 100644
index 0000000..817ffed
--- /dev/null
+++ b/src/android/customCamera/res/drawable-mdpi/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable-mdpi/delete.png b/src/android/customCamera/res/drawable-mdpi/delete.png
new file mode 100644
index 0000000..d0bce15
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/delete.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/flash.png b/src/android/customCamera/res/drawable-mdpi/flash.png
new file mode 100644
index 0000000..4cc553d
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/flash.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/flash_auto.png b/src/android/customCamera/res/drawable-mdpi/flash_auto.png
new file mode 100644
index 0000000..0aeb5cd
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/flash_auto.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/maximise.png b/src/android/customCamera/res/drawable-mdpi/maximise.png
new file mode 100644
index 0000000..02d2629
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/maximise.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/minimise.png b/src/android/customCamera/res/drawable-mdpi/minimise.png
new file mode 100644
index 0000000..6be1655
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/minimise.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/no_flash.png b/src/android/customCamera/res/drawable-mdpi/no_flash.png
new file mode 100644
index 0000000..f906486
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/no_flash.png differ
diff --git a/src/android/customCamera/res/drawable-mdpi/switch_camera.png b/src/android/customCamera/res/drawable-mdpi/switch_camera.png
new file mode 100644
index 0000000..9358ebb
Binary files /dev/null and b/src/android/customCamera/res/drawable-mdpi/switch_camera.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/accept.png b/src/android/customCamera/res/drawable-xhdpi/accept.png
new file mode 100644
index 0000000..d52d872
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/accept.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/back.png b/src/android/customCamera/res/drawable-xhdpi/back.png
new file mode 100644
index 0000000..328a529
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/back.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/capture.png b/src/android/customCamera/res/drawable-xhdpi/capture.png
index 8af281c..22d74fb 100644
Binary files a/src/android/customCamera/res/drawable-xhdpi/capture.png and b/src/android/customCamera/res/drawable-xhdpi/capture.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/custom_seekbar.xml b/src/android/customCamera/res/drawable-xhdpi/custom_seekbar.xml
new file mode 100644
index 0000000..265d234
--- /dev/null
+++ b/src/android/customCamera/res/drawable-xhdpi/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable-xhdpi/delete.png b/src/android/customCamera/res/drawable-xhdpi/delete.png
new file mode 100644
index 0000000..5c6ef66
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/delete.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/flash.png b/src/android/customCamera/res/drawable-xhdpi/flash.png
new file mode 100644
index 0000000..141f6fa
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/flash.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/flash_auto.png b/src/android/customCamera/res/drawable-xhdpi/flash_auto.png
new file mode 100644
index 0000000..1395196
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/flash_auto.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/maximise.png b/src/android/customCamera/res/drawable-xhdpi/maximise.png
new file mode 100644
index 0000000..1d6f361
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/maximise.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/minimise.png b/src/android/customCamera/res/drawable-xhdpi/minimise.png
new file mode 100644
index 0000000..393da8d
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/minimise.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/no_flash.png b/src/android/customCamera/res/drawable-xhdpi/no_flash.png
new file mode 100644
index 0000000..8d99143
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/no_flash.png differ
diff --git a/src/android/customCamera/res/drawable-xhdpi/switch_camera.png b/src/android/customCamera/res/drawable-xhdpi/switch_camera.png
new file mode 100644
index 0000000..1fb82b2
Binary files /dev/null and b/src/android/customCamera/res/drawable-xhdpi/switch_camera.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/accept.png b/src/android/customCamera/res/drawable-xxhdpi/accept.png
new file mode 100644
index 0000000..82bca8d
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/accept.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/back.png b/src/android/customCamera/res/drawable-xxhdpi/back.png
new file mode 100644
index 0000000..700810b
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/back.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/capture.png b/src/android/customCamera/res/drawable-xxhdpi/capture.png
index 7bf527d..64b8d3b 100644
Binary files a/src/android/customCamera/res/drawable-xxhdpi/capture.png and b/src/android/customCamera/res/drawable-xxhdpi/capture.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/custom_seekbar.xml b/src/android/customCamera/res/drawable-xxhdpi/custom_seekbar.xml
new file mode 100644
index 0000000..4581c03
--- /dev/null
+++ b/src/android/customCamera/res/drawable-xxhdpi/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable-xxhdpi/delete.png b/src/android/customCamera/res/drawable-xxhdpi/delete.png
new file mode 100644
index 0000000..48be15d
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/delete.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/flash.png b/src/android/customCamera/res/drawable-xxhdpi/flash.png
new file mode 100644
index 0000000..8d116dd
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/flash.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/flash_auto.png b/src/android/customCamera/res/drawable-xxhdpi/flash_auto.png
new file mode 100644
index 0000000..15fa8be
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/flash_auto.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/maximise.png b/src/android/customCamera/res/drawable-xxhdpi/maximise.png
new file mode 100644
index 0000000..ea0b819
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/maximise.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/minimise.png b/src/android/customCamera/res/drawable-xxhdpi/minimise.png
new file mode 100644
index 0000000..f96b400
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/minimise.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/no_flash.png b/src/android/customCamera/res/drawable-xxhdpi/no_flash.png
new file mode 100644
index 0000000..8cdf157
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/no_flash.png differ
diff --git a/src/android/customCamera/res/drawable-xxhdpi/switch_camera.png b/src/android/customCamera/res/drawable-xxhdpi/switch_camera.png
new file mode 100644
index 0000000..1890f0c
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxhdpi/switch_camera.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/accept.png b/src/android/customCamera/res/drawable-xxxhdpi/accept.png
new file mode 100644
index 0000000..3617ec1
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/accept.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/back.png b/src/android/customCamera/res/drawable-xxxhdpi/back.png
new file mode 100644
index 0000000..54a7f20
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/back.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/capture.png b/src/android/customCamera/res/drawable-xxxhdpi/capture.png
index 23cff10..1329017 100644
Binary files a/src/android/customCamera/res/drawable-xxxhdpi/capture.png and b/src/android/customCamera/res/drawable-xxxhdpi/capture.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/custom_seekbar.xml b/src/android/customCamera/res/drawable-xxxhdpi/custom_seekbar.xml
new file mode 100644
index 0000000..3575733
--- /dev/null
+++ b/src/android/customCamera/res/drawable-xxxhdpi/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/delete.png b/src/android/customCamera/res/drawable-xxxhdpi/delete.png
new file mode 100644
index 0000000..f33c518
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/delete.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/flash.png b/src/android/customCamera/res/drawable-xxxhdpi/flash.png
new file mode 100644
index 0000000..3253e50
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/flash.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/flash_auto.png b/src/android/customCamera/res/drawable-xxxhdpi/flash_auto.png
new file mode 100644
index 0000000..39d7d2f
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/flash_auto.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/maximise.png b/src/android/customCamera/res/drawable-xxxhdpi/maximise.png
new file mode 100644
index 0000000..35af161
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/maximise.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/minimise.png b/src/android/customCamera/res/drawable-xxxhdpi/minimise.png
new file mode 100644
index 0000000..3d3a023
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/minimise.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/no_flash.png b/src/android/customCamera/res/drawable-xxxhdpi/no_flash.png
new file mode 100644
index 0000000..e3692c1
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/no_flash.png differ
diff --git a/src/android/customCamera/res/drawable-xxxhdpi/switch_camera.png b/src/android/customCamera/res/drawable-xxxhdpi/switch_camera.png
new file mode 100644
index 0000000..6272b36
Binary files /dev/null and b/src/android/customCamera/res/drawable-xxxhdpi/switch_camera.png differ
diff --git a/src/android/customCamera/res/drawable/custom_opacity_bar.xml b/src/android/customCamera/res/drawable/custom_opacity_bar.xml
deleted file mode 100644
index 4a86a09..0000000
--- a/src/android/customCamera/res/drawable/custom_opacity_bar.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable/custom_seekbar.xml b/src/android/customCamera/res/drawable/custom_seekbar.xml
new file mode 100644
index 0000000..8d41a74
--- /dev/null
+++ b/src/android/customCamera/res/drawable/custom_seekbar.xml
@@ -0,0 +1,21 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable/custom_thumb.xml b/src/android/customCamera/res/drawable/custom_thumb.xml
new file mode 100644
index 0000000..9f38690
--- /dev/null
+++ b/src/android/customCamera/res/drawable/custom_thumb.xml
@@ -0,0 +1,10 @@
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable/round_button.xml b/src/android/customCamera/res/drawable/round_button.xml
index 7b02ec2..2997439 100644
--- a/src/android/customCamera/res/drawable/round_button.xml
+++ b/src/android/customCamera/res/drawable/round_button.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/android/customCamera/res/drawable/thumb.xml b/src/android/customCamera/res/drawable/thumb.xml
deleted file mode 100644
index 5c01649..0000000
--- a/src/android/customCamera/res/drawable/thumb.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/android/customCamera/res/layout/activity_camera_view.xml b/src/android/customCamera/res/layout/activity_camera_view.xml
index 955e92b..b86d7a6 100644
--- a/src/android/customCamera/res/layout/activity_camera_view.xml
+++ b/src/android/customCamera/res/layout/activity_camera_view.xml
@@ -2,123 +2,183 @@
-
+
+
-
+
-
+
-
-
+ android:layout_gravity="top"
+ android:background="@color/black"
+ android:orientation="horizontal"
+ android:padding="@dimen/default_padding" >
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+ android:orientation="vertical" >
+ android:layout_marginBottom="@dimen/default_padding"
+ android:gravity="center"
+ android:orientation="horizontal" >
-
-
-
+
+
+ android:layout_weight="0.6"
+ android:visibility="visible"
+ android:progressDrawable="@drawable/custom_seekbar" />
+
+
-
+
-
+
+
+
+
+
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:background="@color/black"
+ android:visibility="gone" >
+
+
+
+
+
+
+
+
diff --git a/src/android/customCamera/res/values/colors.xml b/src/android/customCamera/res/values/colors.xml
index d14ba21..d4fdbd3 100644
--- a/src/android/customCamera/res/values/colors.xml
+++ b/src/android/customCamera/res/values/colors.xml
@@ -1,5 +1,5 @@
- #000000
+ #99000000
#ffffff
diff --git a/src/android/customCamera/res/values/dimens.xml b/src/android/customCamera/res/values/dimens.xml
index 55c1e59..3f8a0f8 100644
--- a/src/android/customCamera/res/values/dimens.xml
+++ b/src/android/customCamera/res/values/dimens.xml
@@ -3,5 +3,6 @@
16dp
16dp
+ 10dp
diff --git a/src/android/customCamera/res/values/strings.xml b/src/android/customCamera/res/values/strings.xml
index c6947f0..c8b4692 100644
--- a/src/android/customCamera/res/values/strings.xml
+++ b/src/android/customCamera/res/values/strings.xml
@@ -13,4 +13,6 @@
Il s\'agit de l\'image de fond de l\'appareil photo
Accepter Photo
Refuser Photo
+ -
+ +
diff --git a/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java b/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java
index 23fc0a2..3dbbafd 100644
--- a/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java
+++ b/src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java
@@ -4,12 +4,18 @@ import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Matrix;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.DrawableContainer.DrawableContainerState;
import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.StateListDrawable;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.PictureCallback;
@@ -18,6 +24,8 @@ import android.hardware.Camera.Size;
import android.os.Bundle;
import android.os.Environment;
import android.util.DisplayMetrics;
+import android.util.Log;
+import android.util.TypedValue;
import android.view.Display;
import android.view.Gravity;
import android.view.MotionEvent;
@@ -26,7 +34,6 @@ import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.view.WindowManager;
-import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
@@ -34,10 +41,12 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
import org.geneanet.customcamera.CameraPreview;
import org.geneanet.customcamera.ManagerCamera;
import org.geneanet.customcamera.TransferBigData;
+import org.xmlpull.v1.XmlPullParserException;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
@@ -132,9 +141,9 @@ public class CameraActivity extends Activity {
zoomLevel.setMax(maxZoom);
zoomLevel.setProgress(zoom);
- zoomLevel.setVisibility(View.VISIBLE);
+ displayZoomLevel(View.VISIBLE);
} else {
- zoomLevel.setVisibility(View.INVISIBLE);
+ displayZoomLevel(View.GONE);
}
updateStateFlash(stateFlash);
@@ -185,7 +194,10 @@ public class CameraActivity extends Activity {
ImageButton imgIcon = (ImageButton)findViewById(R.id.capture);
final Activity currentActivity = this;
- this.setCameraBackgroundColor(this.getIntent().getStringExtra("cameraBackgroundColor"));
+ String backgroundColor = this.getIntent().getStringExtra("cameraBackgroundColor");
+ this.setCameraBackgroundColor(backgroundColor);
+ this.setThumbAtSeekBar((SeekBar)findViewById(R.id.zoomLevel), backgroundColor);
+ this.setThumbAtSeekBar((SeekBar)findViewById(R.id.switchOpacity), backgroundColor);
imgIcon.setOnTouchListener(new View.OnTouchListener() {
@Override
@@ -270,7 +282,7 @@ public class CameraActivity extends Activity {
// Hide the switch camera button if the number of cameras is lower than 2.
if(Camera.getNumberOfCameras() < 2){
ImageButton switchCamera = (ImageButton) findViewById(R.id.switchCamera);
- switchCamera.setVisibility(View.INVISIBLE);
+ switchCamera.setVisibility(View.GONE);
}
}
@@ -352,6 +364,40 @@ public class CameraActivity extends Activity {
}
}
+ /**
+ * Set thumb at a seekbar.
+ *
+ * @param color
+ */
+ protected void setThumbAtSeekBar(SeekBar seekBar, String color) {
+ int colorParsed = Color.parseColor(color);
+ String colorAlpha = color.substring(1);
+ colorAlpha = "#88"+colorAlpha;
+ int colorAlphaParsed = Color.parseColor(colorAlpha);
+
+ StateListDrawable selectorThumb;
+ Resources res = getResources();
+ try {
+ selectorThumb = (StateListDrawable) Drawable.createFromXml(res, res.getXml(R.drawable.custom_thumb));
+ DrawableContainerState thumbState = (DrawableContainerState) selectorThumb.getConstantState();
+ GradientDrawable thumb = (GradientDrawable) thumbState.getChildren()[0];
+ thumb.setColor(colorParsed);
+ Resources r = getResources();
+ int px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, r.getDisplayMetrics());
+ thumb.setStroke(px, colorAlphaParsed);
+ seekBar.setThumb(thumb);
+ } catch (NotFoundException e) {
+ Log.e("customCamera", "Xml resource is not found.");
+ e.printStackTrace();
+ } catch (XmlPullParserException e) {
+ Log.e("customCamera", "Xml can't be parsed.");
+ e.printStackTrace();
+ } catch (IOException e) {
+ Log.e("customCamera", "Error to create the thumb");
+ e.printStackTrace();
+ }
+ }
+
/**
* Determine the space between the first two fingers.
* @param MotionEvent event Current event which start this calculation.
@@ -406,7 +452,7 @@ public class CameraActivity extends Activity {
SeekBar zoomLevel = (SeekBar) findViewById(R.id.zoomLevel);
zoomLevel.setMax(maxZoom);
zoomLevel.setProgress(zoom * 2);
- zoomLevel.setVisibility(View.VISIBLE);
+ displayZoomLevel(View.VISIBLE);
}
/** To set background in the view. */
@@ -474,25 +520,40 @@ public class CameraActivity extends Activity {
*/
public void buttonMiniature(View view) {
ImageView background = (ImageView) findViewById(R.id.background);
- final Button miniature = (Button) view;
+ ImageButton miniature = (ImageButton) view;
- modeMiniature = true;
- // Set new size for miniature layout.
- setParamsMiniature(background, true);
- // Hide the miniature button.
- miniature.setVisibility(View.INVISIBLE);
-
- // Add event on click action for the miniature picture.
- background.setOnClickListener(new View.OnClickListener() {
- public void onClick(View view) {
- modeMiniature = false;
- ImageView background = (ImageView) view;
- // Resize miniature.
- background.setClickable(false);
- setBackground();
- miniature.setVisibility(View.VISIBLE);
- }
- });
+ if (!modeMiniature) {
+ miniature.setImageResource(R.drawable.minimise);
+ // Reset the default position and size for the background.
+ setBackground();
+ } else {
+ miniature.setImageResource(R.drawable.maximise);
+ // Set new size for miniature layout.
+ setParamsMiniature(background, true);
+ }
+ }
+
+ /**
+ * Toggle the miniature function.
+ *
+ * @param view
+ */
+ public void toggleMiniature(View view) {
+ modeMiniature = !modeMiniature;
+ buttonMiniature(view);
+ }
+
+ /**
+ * To manage the display of the zoom bar.
+ * @param displayStatus
+ */
+ public void displayZoomLevel(int displayStatus) {
+ TextView textZoomMin = (TextView) findViewById(R.id.textZoomMin);
+ TextView textZoomMax = (TextView) findViewById(R.id.textZoomMax);
+ SeekBar zoomLevel = (SeekBar) findViewById(R.id.zoomLevel);
+ textZoomMin.setVisibility(displayStatus);
+ textZoomMax.setVisibility(displayStatus);
+ zoomLevel.setVisibility(displayStatus);
}
/**
@@ -518,17 +579,23 @@ public class CameraActivity extends Activity {
* @param paramsMiniature The parameters of the layout.
*/
public void positioningMiniature(RelativeLayout.LayoutParams paramsMiniature) {
- if (photoTaken == null) {
- // Position at the bottom
- paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
- paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
- } else {
- // Position at the top
- paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
- paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
- }
- // In all cases, position at the left
+ // Position at the bottom
+ paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
+ paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
+ // Position at the left
paramsMiniature.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
+
+ if (photoTaken != null) {
+ Resources res = getResources();
+
+ int defaultPadding = (int)res.getDimension(R.dimen.default_padding);
+
+ BitmapDrawable image = (BitmapDrawable) res.getDrawable(R.drawable.accept);
+ int marginBottom = image.getBitmap().getHeight() + (defaultPadding * 2);
+ paramsMiniature.setMargins(0, 0, 0, marginBottom);
+ } else {
+ paramsMiniature.setMargins(0, 0, 0, 0);
+ }
}
/**
@@ -536,31 +603,30 @@ public class CameraActivity extends Activity {
*/
public void manageDisplayButtons() {
LinearLayout keepPhoto = (LinearLayout) findViewById(R.id.keepPhoto);
- Button miniature = (Button) findViewById(R.id.miniature);
+ ImageButton miniature = (ImageButton) findViewById(R.id.miniature);
ImageButton flash = (ImageButton) findViewById(R.id.flash);
ImageButton photo = (ImageButton) findViewById(R.id.capture);
ImageButton switchCamera = (ImageButton) findViewById(R.id.switchCamera);
ImageView background = (ImageView) findViewById(R.id.background);
- SeekBar zoomLevel = (SeekBar) findViewById(R.id.zoomLevel);
SeekBar switchOpacity = (SeekBar) findViewById(R.id.switchOpacity);
LayoutParams paramsLayoutMiniature = (LinearLayout.LayoutParams) miniature.getLayoutParams();
Camera.Parameters paramsCamera = customCamera.getParameters();
if (!this.getIntent().getBooleanExtra("miniature", true)) {
- miniature.setVisibility(View.INVISIBLE);
+ miniature.setVisibility(View.GONE);
}
if (!opacity) {
- switchOpacity.setVisibility(View.INVISIBLE);
+ switchOpacity.setVisibility(View.GONE);
}
if (photoTaken != null) {
// Show/hide elements when a photo is taken
keepPhoto.setVisibility(View.VISIBLE);
- photo.setVisibility(View.INVISIBLE);
- zoomLevel.setVisibility(View.INVISIBLE);
- flash.setVisibility(View.INVISIBLE);
- switchCamera.setVisibility(View.INVISIBLE);
+ photo.setVisibility(View.GONE);
+ displayZoomLevel(View.GONE);
+ flash.setVisibility(View.GONE);
+ switchCamera.setVisibility(View.GONE);
((LinearLayout.LayoutParams) paramsLayoutMiniature).gravity = Gravity.TOP;
miniature.setLayoutParams(paramsLayoutMiniature);
@@ -571,22 +637,22 @@ public class CameraActivity extends Activity {
} else {
// Show/hide elements when a photo is not taken
- keepPhoto.setVisibility(View.INVISIBLE);
+ keepPhoto.setVisibility(View.GONE);
photo.setVisibility(View.VISIBLE);
if (paramsCamera.isZoomSupported()) {
- zoomLevel.setVisibility(View.VISIBLE);
+ displayZoomLevel(View.VISIBLE);
}
if (this.getIntent().getBooleanExtra("switchFlash", true) && hasFlash()) {
flash.setVisibility(View.VISIBLE);
} else {
- flash.setVisibility(View.INVISIBLE);
+ flash.setVisibility(View.GONE);
}
if (this.getIntent().getBooleanExtra("switchCamera", true)) {
switchCamera.setVisibility(View.VISIBLE);
} else {
- switchCamera.setVisibility(View.INVISIBLE);
+ switchCamera.setVisibility(View.GONE);
}
((LinearLayout.LayoutParams) paramsLayoutMiniature).gravity = Gravity.BOTTOM;
@@ -814,10 +880,10 @@ public class CameraActivity extends Activity {
Bitmap newBitmap = resizePictureTaken();
photoResized.setImageBitmap(newBitmap);
photoResized.setVisibility(View.VISIBLE);
- preview.setVisibility(View.INVISIBLE);
+ preview.setVisibility(View.GONE);
} else {
customCamera.startPreview();
- photoResized.setVisibility(View.INVISIBLE);
+ photoResized.setVisibility(View.GONE);
preview.setVisibility(View.VISIBLE);
}
@@ -912,6 +978,13 @@ public class CameraActivity extends Activity {
this.finish();
}
+ /**
+ * When the leave button is pressed.
+ */
+ public void leaveCamera(View v) {
+ onBackPressed();
+ }
+
/**
* Allow to enable or disable the flash of the camera.
* @param view The current view.