Вы можете использовать FrameLayout
следующим образом:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.view.SurfaceView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.view.SurfaceView>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="#FFFFFF" android:layout_alignParentBottom="true">
<ImageView android:scaleType="centerCrop" android:src="@drawable/some_drawable" android:layout_centerInParent="true" android:clickable="true"
android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/my_button"/>
</RelativeLayout>
</FrameLayout>
Упаковка всего в FrameLayout
- это один из способов просто сложить представления поверх SurfaceView
.Используйте аналогичный подход для добавления видоискателя.