TextView не на переднем плане (это позади CameraSource) - Android студия - PullRequest
0 голосов
/ 13 сентября 2018

У меня странная, но, вероятно, легкая проблема с моим макетом.Я реализую графическую часть своего проекта, и я хотел бы поместить в текстовом виде (в частности, я бы поместил 2 textview в центральное положение) некоторое textview и в фоновом режиме SourceCameraPreview, но я ничего не вижу.Может ли кто-нибудь помочь мне?это мой файл main_activity.xml:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/topLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true"
    android:orientation="vertical">

    <com.google.android.gms.samples.vision.face.rPPG.ui.camera.CameraSourcePreview
        android:id="@+id/preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >
        <TextView
            android:id="@+id/textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:gravity="center_vertical|center_horizontal"
            android:text="@string/no_faces_found"
            android:textStyle="bold"
            android:visibility="invisible" />
        <TextView
            android:id="@+id/info3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:gravity="center_vertical|center_horizontal"
            android:layout_weight="1"
            android:background="#00ffffff"
            android:text=""/>


        <com.google.android.gms.samples.vision.face.rPPG.ui.camera.GraphicOverlay
            android:id="@+id/faceOverlay"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />



    </com.google.android.gms.samples.vision.face.rPPG.ui.camera.CameraSourcePreview>
    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>





    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="140dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentStart="true"
        android:background="#000000"
        android:orientation="vertical"
        android:paddingLeft="16dp"
        android:paddingRight="16dp">



        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentTop="true"

            android:orientation="horizontal">

            <com.jjoe64.graphview.GraphView
                android:id="@+id/graph"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#d3d3d3" />
        </LinearLayout>
    </LinearLayout>

</RelativeLayout>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...