There is an application with a lower toolbar. It is necessary to make the camera window, which leaves the bottom by pressing the left button. The window should go to 1/3 of the screen, the toolbar should be above it. Made a camera in SurfaceView. How to make a trip?
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/parent" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" tools:context=".activity.MainActivity"> <SurfaceView android:id="@+id/camera_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" /> <RelativeLayout android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="#f4f5f7"> <ImageButton android:id="@+id/btn_camera" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:background="#f4f5f7" android:padding="10dp" android:scaleType="fitCenter" android:src="@drawable/camera59" /> <ImageButton android:id="@+id/btn_mic" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:background="#f4f5f7" android:padding="10dp" android:scaleType="fitCenter" android:src="@drawable/microphone85" /> <ImageButton android:id="@+id/btn_cat" android:layout_width="50dp" android:layout_height="50dp" android:layout_toLeftOf="@id/btn_mic" android:layout_toStartOf="@id/btn_mic" android:background="#f4f5f7" android:padding="10dp" android:scaleType="fitCenter" android:src="@drawable/square234" /> <com.superup.smartshelf.utils.ClearableAutoComplete android:id="@+id/autocomplete" android:layout_width="match_parent" android:layout_height="30dp" android:layout_marginTop="10dp" android:layout_toEndOf="@id/btn_camera" android:layout_toLeftOf="@id/btn_cat" android:layout_toRightOf="@id/btn_camera" android:layout_toStartOf="@id/btn_cat" android:background="@drawable/round_rect_shape" android:padding="3dp" android:singleLine="true" /> </RelativeLayout> <com.superup.smartshelf.view.SnappingRecyclerView android:id="@+id/item_list" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_above="@id/toolbar" /> </RelativeLayout> 
