我想在自定义缩放视图的下方放置相对布局。我不想让相对布局的内容获得缩放。我想要一个按钮放置在相对布局的中心。在自定义缩放视图下方的相对布局中放置一个按钮
这里是我的XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/images">
<com.example.acer.myapplication.ZoomView
android:id="@+id/iop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/twentyfive" />
</LinearLayout>
为什么要使用相对布局和创建嵌套布局?您可以简单地将按钮放在zoomView下方,因为您是linearLayout –