call: hide preview feature

Change-Id: I8f22a67840d5f7ec4649a248894e86562af89f17
diff --git a/ring-android/app/src/main/res/drawable/ic_chevron_left_24px.xml b/ring-android/app/src/main/res/drawable/ic_chevron_left_24px.xml
new file mode 100644
index 0000000..272e1fb
--- /dev/null
+++ b/ring-android/app/src/main/res/drawable/ic_chevron_left_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M15.41,7.41L14,6l-6,6 6,6 1.41,-1.41L10.83,12z"/>
+</vector>
diff --git a/ring-android/app/src/main/res/drawable/ic_chevron_right_24px.xml b/ring-android/app/src/main/res/drawable/ic_chevron_right_24px.xml
new file mode 100644
index 0000000..70a53ea
--- /dev/null
+++ b/ring-android/app/src/main/res/drawable/ic_chevron_right_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
+</vector>
diff --git a/ring-android/app/src/main/res/drawable/ic_preview_handle.xml b/ring-android/app/src/main/res/drawable/ic_preview_handle.xml
new file mode 100644
index 0000000..d6a5af0
--- /dev/null
+++ b/ring-android/app/src/main/res/drawable/ic_preview_handle.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="3dp"
+    android:height="60dp"
+    android:viewportWidth="1.5272485"
+    android:viewportHeight="48.024227">
+  <path
+      android:pathData="M0.7636,-0L0.7636,-0A0.8484,0.7636 90,0 1,1.5272 0.8484L1.5272,47.1759A0.8484,0.7636 90,0 1,0.7636 48.0242L0.7636,48.0242A0.8484,0.7636 90,0 1,0 47.1759L0,0.8484A0.8484,0.7636 90,0 1,0.7636 -0z"
+      android:strokeWidth="0.0746897"
+      android:fillColor="#80ffffff"/>
+</vector>
diff --git a/ring-android/app/src/main/res/drawable/show_preview.xml b/ring-android/app/src/main/res/drawable/show_preview.xml
new file mode 100644
index 0000000..db8a3be
--- /dev/null
+++ b/ring-android/app/src/main/res/drawable/show_preview.xml
@@ -0,0 +1,18 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="35dp"
+    android:height="207dp"
+    android:viewportWidth="35"
+    android:viewportHeight="207">
+  <path
+      android:pathData="M4.082,0.001L30.917,0.001A4.783,4.083 90,0 1,34.999 4.783L34.999,202.216A4.783,4.083 90,0 1,30.917 206.999L4.082,206.999A4.783,4.083 90,0 1,-0.001 202.216L-0.001,4.783A4.783,4.083 90,0 1,4.082 0.001z"
+      android:strokeWidth="0.210926"
+      android:fillColor="#c8beb7"/>
+  <path
+      android:pathData="M5.329,79.488L5.329,79.488A0.848,0.764 90,0 1,6.092 80.336L6.092,126.664A0.848,0.764 90,0 1,5.329 127.512L5.329,127.512A0.848,0.764 90,0 1,4.565 126.664L4.565,80.336A0.848,0.764 90,0 1,5.329 79.488z"
+      android:strokeWidth="0.0746897"
+      android:fillColor="#241c1c"/>
+  <path
+      android:pathData="M29.738,79.488L29.738,79.488A0.905,0.764 90,0 1,30.501 80.393L30.501,126.606A0.905,0.764 90,0 1,29.738 127.512L29.738,127.512A0.905,0.764 90,0 1,28.974 126.606L28.974,80.393A0.905,0.764 90,0 1,29.738 79.488z"
+      android:strokeWidth="0.0746894"
+      android:fillColor="#241c1c"/>
+</vector>
diff --git a/ring-android/app/src/main/res/drawable/transparent_round_grey.xml b/ring-android/app/src/main/res/drawable/transparent_round_grey.xml
new file mode 100644
index 0000000..0a557ee
--- /dev/null
+++ b/ring-android/app/src/main/res/drawable/transparent_round_grey.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="#D84F4F4F" />
+</shape>
\ No newline at end of file
diff --git a/ring-android/app/src/main/res/layout/frag_call.xml b/ring-android/app/src/main/res/layout/frag_call.xml
index d738c9e..dff201d 100644
--- a/ring-android/app/src/main/res/layout/frag_call.xml
+++ b/ring-android/app/src/main/res/layout/frag_call.xml
@@ -60,14 +60,25 @@
                 android:visibility="gone"
                 app:cardCornerRadius="16dp"
                 app:cardPreventCornerOverlap="false"
-                tools:visibility="visible">
+                tools:visibility="visible"
+                app:cardBackgroundColor="@color/black">
 
                 <cx.ring.views.AutoFitTextureView
                     android:id="@+id/preview_surface"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:visibility="visible"/>
+
+                <ImageView
+                    android:id="@+id/preview_handle"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="left|center_vertical"
+                    android:layout_marginHorizontal="@dimen/call_preview_margin_handle"
                     android:visibility="visible"
-                    tools:visibility="visible" />
+                    android:alpha="0"
+                    app:srcCompat="@drawable/ic_preview_handle" />
+
             </androidx.cardview.widget.CardView>
 
         </RelativeLayout>
@@ -85,7 +96,7 @@
                 android:layout_height="wrap_content"
                 android:layout_centerInParent="true"
                 android:orientation="vertical"
-                android:visibility="visible"
+                android:visibility="gone"
                 app:flexDirection="column"
                 app:flexWrap="wrap"
                 tools:visibility="visible">
@@ -158,8 +169,7 @@
                     <LinearLayout
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:orientation="horizontal"
-                        tools:visibility="visible">
+                        android:orientation="horizontal">
 
                         <com.google.android.material.floatingactionbutton.FloatingActionButton
                             android:id="@+id/call_refuse_btn"
@@ -169,14 +179,15 @@
                             android:contentDescription="@string/action_call_decline"
                             android:onClick="@{() -> presenter.refuseClicked()}"
                             android:tint="@color/white"
-                            tools:visibility="visible"
+                            android:visibility="gone"
                             app:backgroundTint="@color/colorError"
                             app:elevation="6dp"
                             app:fabSize="normal"
                             app:pressedTranslationZ="12dp"
                             app:rippleColor="@android:color/white"
                             app:srcCompat="@drawable/baseline_call_end_24"
-                            app:useCompatPadding="true" />
+                            app:useCompatPadding="true"
+                            tools:visibility="visible" />
 
                         <com.google.android.material.floatingactionbutton.FloatingActionButton
                             android:id="@+id/call_accept_btn"
@@ -185,14 +196,15 @@
                             android:layout_margin="16dp"
                             android:contentDescription="@string/action_call_accept"
                             android:onClick="@{() -> presenter.acceptClicked()}"
-                            android:visibility="visible"
+                            android:visibility="gone"
                             app:backgroundTint="@color/green_500"
                             app:elevation="6dp"
                             app:fabSize="normal"
                             app:pressedTranslationZ="12dp"
                             app:rippleColor="@android:color/white"
                             app:srcCompat="@drawable/baseline_call_24"
-                            app:useCompatPadding="true" />
+                            app:useCompatPadding="true"
+                            tools:visibility="visible" />
                     </LinearLayout>
 
                 </LinearLayout>
@@ -276,14 +288,14 @@
             </com.google.android.flexbox.FlexboxLayout>
 
             <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/conf_control_group"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:id="@+id/conf_control_group"
-                android:layout_alignParentEnd="true"
                 android:layout_alignParentTop="true"
+                android:layout_alignParentEnd="true"
                 app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-                tools:listitem="@layout/item_conference_participant"
-                tools:itemCount="4" />
+                tools:itemCount="4"
+                tools:listitem="@layout/item_conference_participant" />
 
             <EditText
                 android:id="@+id/dialpad_edit_text"
@@ -313,5 +325,6 @@
                 app:useCompatPadding="true" />
 
         </RelativeLayout>
+
     </FrameLayout>
 </layout>
\ No newline at end of file
diff --git a/ring-android/app/src/main/res/values/dimens.xml b/ring-android/app/src/main/res/values/dimens.xml
index 275788b..2866f91 100644
--- a/ring-android/app/src/main/res/values/dimens.xml
+++ b/ring-android/app/src/main/res/values/dimens.xml
@@ -72,6 +72,8 @@
     <dimen name="call_preview_elevation">8dp</dimen>
     <dimen name="call_preview_elevation_dragged">16dp</dimen>
     <dimen name="call_preview_margin">12dp</dimen>
+    <dimen name="call_preview_margin_big">65dp</dimen>
+    <dimen name="call_preview_margin_handle">12dp</dimen>
 
     <dimen name="wizard_button_width">340dp</dimen>
     <dimen name="wizard_button_corner_radius">12dp</dimen>
diff --git a/ring-android/app/src/main/res/values/strings.xml b/ring-android/app/src/main/res/values/strings.xml
index 68c0be4..5fb04f3 100644
--- a/ring-android/app/src/main/res/values/strings.xml
+++ b/ring-android/app/src/main/res/values/strings.xml
@@ -154,6 +154,7 @@
     <string name="write_a_message">Write a message</string>
     <string name="scan_qr">Scan QR Code</string>
     <string name="ab_action_flipcamera">Flip camera</string>
+    <string name="ab_action_hidepreview">Hide preview</string>
 
     <!-- Text messages -->
     <string name="send_message">Send message</string>