我在将图像叠加到相机预览上时遇到问题。如何设置相同的大小? 无论布局设置如何,视频帧大小看起来都是固定的,而图像视图却根据布局设置而改变?
<?xml version="1.0" encoding="utf-8"?>
<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="fill_parent"
android:layout_height="fill_parent"
tools:context=".MainActivity">
<TextureView android:id="@+id/textureView1"
android:layout_width="300dp"
android:layout_height="300dp"/>
<ImageView android:id="@+id/imageView1"
android:layout_width="300dp"
android:layout_height="300dp" />
</FrameLayout>