【发布时间】:2019-02-09 18:13:42
【问题描述】:
我一直在开发一个应用程序,并希望在相机视图下方添加一个文本视图,以便我可以在那里显示一些文本。 但是,由于某种原因,当尝试将文本视图拖入布局时,它不会显示在最终屏幕上。
这是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topLayout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true">
<com.google.android.CameraSourcePreview
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.GraphicOverlay
android:id="@+id/faceOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.google.android.CameraSourcePreview>
</LinearLayout>
【问题讨论】:
-
你能展示你的演示设计吗?
标签: android android-layout android-camera android-view