В моем приложении/действии i отображает предварительный просмотр камеры в качестве фона (в виде прозрачного экрана), в верхней части экрана камеры отображаются разные значки, но внизу или на некоторых устройствах справа отображается один line, но в том, что некоторые diveces - он не отображается хорошо.Предварительный просмотр камеры Android не отображается на весь экран
означает камеру предварительного просмотра через в нижней осыпи или правой стороне экрана, я установить его соответствие родителя, то и его отображения, как это, я более discribe его в образах,
См. Внизу, он отображает синий цвет, это фон основного файла макета, я устанавливаю его как родительский элемент сравнения, а затем также в некоторых устройствах, которые он отображает внизу, а в некоторых - в вертикальной правой части.
мой файл макета заключается в следующем:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0000ff" >
<AnalogClock
android:id="@+id/analogClock1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<TextView
android:id="@+id/txtDayDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/analogClock1"
android:layout_centerInParent="true"
android:textColor="@android:color/white" />
<LinearLayout
android:id="@+id/llayoutBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/llayoutBottom"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginBottom="15dp"
android:orientation="horizontal" >
<Button
android:id="@+id/btnSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:background="@drawable/setting" />
<Button
android:id="@+id/btnGallary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:background="@drawable/gallary" />
<Button
android:id="@+id/btnCamera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:background="@drawable/camera" />
<Button
android:id="@+id/btnPlaystore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/playstore" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:layout_marginTop="5dp"
android:background="@android:color/white" />
<LinearLayout
android:id="@+id/llayoutBottom"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
android:visibility="visible" >
<Button
android:id="@+id/btnCall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:background="@drawable/call" />
<Button
android:id="@+id/btnWeb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:background="@drawable/web" />
<Button
android:id="@+id/btnApp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:background="@drawable/menu" />
<Button
android:id="@+id/btnMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:background="@drawable/message" />
<Button
android:id="@+id/btnGmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/gmail" />
</LinearLayout>
</LinearLayout>
<GridView
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnWidth="100dp"
android:gravity="center"
android:horizontalSpacing="10dp"
android:numColumns="3"
android:stretchMode="columnWidth"
android:verticalSpacing="10dp"
android:visibility="gone" />
</RelativeLayout>
он установлен в файле Java следующим образом:
mPreview = new ResizableCameraPreview(this, mCameraId,
CameraPreview.LayoutMode.FitToParent, false);
LayoutParams previewLayoutParams = new LayoutParams(
LayoutParams.MATCH_PARENT
, LayoutParams.MATCH_PARENT);
mLayout.addView(mPreview, 0, previewLayoutParams);
я пытаюсь сказать, на мой вопрос, это не очень хорошо просил, но если какой-либо отдавания меня решение тогда это очень оценили.