Android 在安卓系统中,我如何使孩子比家长大?

Android 在安卓系统中,我如何使孩子比家长大?,android,android-layout,Android,Android Layout,我正在尝试将imageView插入到相对/线性布局中,以使imageView大于父级。到目前为止,我在imageView上尝试了负边距和填充,并在父视图上将clipChildren设置为false,但似乎没有任何帮助。以前有人做过这样的事吗 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools

我正在尝试将imageView插入到相对/线性布局中,以使imageView大于父级。到目前为止,我在imageView上尝试了负边距和填充,并在父视图上将clipChildren设置为false,但似乎没有任何帮助。以前有人做过这样的事吗

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:tools="http://schemas.android.com/tools"
         android:layout_width="match_parent"
         android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="10dp"
        android:layout_height="10dp"
        android:layout_gravity="center"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:orientation="vertical">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@color/text_black"
            android:paddingBottom="-100dp"
            android:paddingLeft="-100dp"
            android:paddingRight="-100dp"
            android:paddingTop="-100dp"
            android:src="@drawable/logo"/>
    </LinearLayout>

</FrameLayout>

基本上,我正在努力实现这样的目标。。。 state1-具有一系列视图组。当我单击其中一个视图组时,会出现状态2,其中视图组内的图像完全可见,并与周围的任何视图组重叠,而不会影响其位置


那么,为什么不将Width and Height=wrapcontent赋予父容器呢?

容器的大小受父容器的限制,因此不可能将较大的容器放入其中(你不能将5升的盒子放入3升的盒子中)

ImageView有一个“缩放”属性,可以剪裁或调整视图(并保持适当大小)


您希望此ImageView的行为是什么?它应该滚动,还是应该简单地裁剪掉多余的内容?imageView应该在父视图上完全可见,没有剪辑。您可以上传图像或手工制作的草图来显示您想要显示的内容吗?你到底希望实现什么?将更好地提供帮助。添加了更多详细信息。使用与当前FrameLayout相同级别的另一个FrameLayout,并将较大的ImageView正确居中或填充。