以下のモック グラフィックのような RelativeLayout ベースの Android UI が必要です。
以下は私のレイアウトxmlです:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayoutForPreview"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- surface view that contains camera preview , and seats above @+id/linearLayoutToolbar -->
<SurfaceView
android:id="@+id/surfaceViewBarcodeScanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- LinearLayout that contains toolbar that is divided into 3 sections horizontally -->
<LinearLayout
android:id="@+id/linearLayoutToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/surfaceViewBarcodeScanner"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/scanner_bottom_left" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/scanner_bottom_center_toolbar" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/scanner_bottom_right_landscape_button" />
</LinearLayout>
</RelativeLayout>
Eclipse GUI パレットと独自の編集を使用しましたが、出力が期待したものではなく、SurfaceView が画面全体を覆っているように見え、下部の LinearLayout が表示されません。
Galaxy S3 デバイスでの現在の結果のスナップショット:
どんな助けでも感謝します、ありがとう。