Change demo app appearance

pull/360/head
Mattia Iavarone 6 years ago
parent 34b9958c3e
commit 481062a08b
  1. 2
      demo/src/main/java/com/otaliastudios/cameraview/demo/Control.java
  2. 21
      demo/src/main/res/layout/activity_camera.xml

@ -63,7 +63,7 @@ public enum Control {
int boundary = this == WIDTH ? root.getWidth() : root.getHeight(); int boundary = this == WIDTH ? root.getWidth() : root.getHeight();
if (boundary == 0) boundary = 1000; if (boundary == 0) boundary = 1000;
int step = boundary / 10; int step = boundary / 10;
list.add(this == WIDTH ? 300 : 700); // list.add(this == WIDTH ? 300 : 700);
list.add(ViewGroup.LayoutParams.WRAP_CONTENT); list.add(ViewGroup.LayoutParams.WRAP_CONTENT);
list.add(ViewGroup.LayoutParams.MATCH_PARENT); list.add(ViewGroup.LayoutParams.MATCH_PARENT);
for (int i = step; i < boundary; i += step) { for (int i = step; i < boundary; i += step) {

@ -11,10 +11,12 @@
<com.otaliastudios.cameraview.CameraView <com.otaliastudios.cameraview.CameraView
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/camera" android:id="@+id/camera"
android:layout_width="300px" android:layout_width="wrap_content"
android:layout_height="700px" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginBottom="88dp"
android:keepScreenOn="true" android:keepScreenOn="true"
app:cameraPreview="surface"
app:cameraExperimental="true" app:cameraExperimental="true"
app:cameraPlaySounds="true" app:cameraPlaySounds="true"
app:cameraGrid="off" app:cameraGrid="off"
@ -45,13 +47,14 @@
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:padding="16dp" android:padding="16dp"
android:orientation="horizontal" android:orientation="horizontal"
android:background="@color/colorPrimary"
android:weightSum="4"> android:weightSum="4">
<ImageButton <ImageButton
android:id="@+id/edit" android:id="@+id/edit"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/background" android:background="?attr/selectableItemBackgroundBorderless"
app:srcCompat="@drawable/ic_edit" /> app:srcCompat="@drawable/ic_edit" />
<Space <Space
@ -63,7 +66,7 @@
android:id="@+id/capturePicture" android:id="@+id/capturePicture"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/background" android:background="?attr/selectableItemBackgroundBorderless"
app:srcCompat="@drawable/ic_photo" /> app:srcCompat="@drawable/ic_photo" />
<Space <Space
@ -76,8 +79,8 @@
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center" android:background="?attr/selectableItemBackgroundBorderless"
android:background="@drawable/background" > android:gravity="center" >
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -100,7 +103,7 @@
android:id="@+id/captureVideo" android:id="@+id/captureVideo"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/background" android:background="?attr/selectableItemBackgroundBorderless"
app:srcCompat="@drawable/ic_video" /> app:srcCompat="@drawable/ic_video" />
<Space <Space
@ -114,8 +117,8 @@
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center" android:background="?attr/selectableItemBackgroundBorderless"
android:background="@drawable/background" > android:gravity="center" >
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

Loading…
Cancel
Save