如何添加android zxing条码扫描选项卡?

如何添加android zxing条码扫描选项卡?,android,cordova,barcode-scanner,Android,Cordova,Barcode Scanner,我对phonegap的android zxing条形码扫描有问题。我是一名新的android应用程序开发人员。如何添加扫描仪视图选项卡栏?我以前搜索过capture.xml布局文件,但ıt给了我一个错误。我如何解决我的问题?请你帮我一下,或者给我一些建议。 Capture.xml <?xml version="1.0" encoding="UTF-8"?> <FrameLayout xmlns:android="http://schemas.android.com/ap

我对phonegap的android zxing条形码扫描有问题。我是一名新的android应用程序开发人员。如何添加扫描仪视图选项卡栏?我以前搜索过capture.xml布局文件,但ıt给了我一个错误。我如何解决我的问题?请你帮我一下,或者给我一些建议。 Capture.xml

<?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" >

    <SurfaceView
    android:id="@+id/preview_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" />


    <TabHost
    android:id="@+id/tabhost"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true" >

    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    <TabWidget
    android:id="@android:id/tabs"
    android:layout_width="match_parent"
    android:layout_height="108dp" >
    </TabWidget>

    <FrameLayout
    android:id="@android:id/tabcontent"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
    android:id="@+id/tab1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    </LinearLayout>

    <LinearLayout
    android:id="@+id/tab2"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    </LinearLayout>

    <LinearLayout
    android:id="@+id/tab3"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    </LinearLayout>
    </FrameLayout>
    </LinearLayout>
    </TabHost>

    <com.google.zxing.client.android.ViewfinderView
    android:id="@+id/viewfinder_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" />
    <LinearLayout
    android:id="@+id/result_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/result_view"
    android:baselineAligned="false"
    android:orientation="vertical"
    android:visibility="gone" >

    <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:gravity="center"
    android:orientation="horizontal"
    android:padding="@dimen/standard_padding" >

    <LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:gravity="right|center_vertical"
    android:orientation="vertical" >

    <ImageView
    android:id="@+id/barcode_image_view"
    android:layout_width="160dip"
    android:layout_height="wrap_content"
    android:layout_marginBottom="@dimen/half_padding"
                android:adjustViewBounds="true"
                android:maxHeight="160dip"
                android:maxWidth="160dip"
                android:scaleType="centerInside" />

    <LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >
    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:paddingRight="@dimen/half_padding"
    android:text="@string/msg_default_format"
    android:textColor="@color/result_minor_text"
    android:textStyle="bold" />        
    </LinearLayout>
    </FrameLayout>

onCreate函数。但我没有显示摄像头布局选项卡。

您必须显示一些努力。发布您的代码和错误消息。我需要帮助。请给我一些关于tabbar问题的想法。当我打开相机时,我无法同时看到选项卡栏。我没有找到确切的问题,但我不知道我需要做什么。我仍然找不到您收到的错误消息。您到底想要什么?问题不在于错误信息,而在于我需要查看选项卡栏这是我的问题。。。。
public void onCreate (Bundle icicle)  {
    super.onCreate(icicle);
    Window window = getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setContentView(R.layout.capture);
    hasSurface = false;
    historyManager = new HistoryManager(this);
    historyManager.trimHistory();
    inactivityTimer = new InactivityTimer(this);
    beepManager = new BeepManager(this);
    PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
    showHelpOnFirstLaunch();
}