我想在相機預覽中實現如下圖所示的覆蓋圖。 在Android Camera Preview中重疊覆蓋
我的XML是這樣的:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:orientation="horizontal" >
<FrameLayout
android:id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="399dp" >
</FrameLayout>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/camera_preview"
android:layout_marginLeft="35dp"
android:text="@string/share" />
<Button
android:id="@+id/button_capture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button1"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/button1"
android:layout_marginRight="38dp"
android:text="@string/capture" />
</RelativeLayout>
如果我嘗試使用列表視圖在的FrameLayout它不執行我的代碼後表現出來攝像頭預覽。任何想法如何可以在相機預覽中有這樣的覆蓋?