我的主要活动中有一个javacameraview。我想在相机前面放一些控制按钮
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.gustavo.tassio.opencvnativeandroid.Principal">
<org.opencv.android.JavaCameraView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:show_fps="true"
app:camera_id="any"
android:id="@+id/cameraOpenCv"/>
JavaCameraView cameraView;
cameraView = (JavaCameraView) findViewById(R.id.cameraOpenCv);
cameraView.setVisibility(SurfaceView.VISIBLE);
cameraView.setCvCameraViewListener(this);
现在就像这样,只是纯粹的形象,我的想法就是把按钮放在这个场景上
答案 0 :(得分:0)
如果向framelayout添加按钮,它们将按您的意愿显示。 framelayout中的视图按时间顺序显示。当您更改framelayout子视图的可见性时,它的顺序不会更改,您在xll或编程后添加的所有子视图都将被绘制在&#34;以上&#34;。