Android 防止ImageView图形超出父布局的边界

Android 防止ImageView图形超出父布局的边界,android,android-layout,android-xml,Android,Android Layout,Android Xml,我有一个具有缩放功能的图像视图 <com.github.chrisbanes.photoview.PhotoView android:id="@+id/helfie_preview" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:sc

我有一个具有缩放功能的图像视图

<com.github.chrisbanes.photoview.PhotoView
        android:id="@+id/helfie_preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:scaleType="center" />
我尝试了从
clipChildren
clipPadding
的所有方法,以确保ImageView不会超出线性布局的界限,迄今为止没有一种方法有效。使用cardview进行修复(但在某些设备上失败,我只需要顶角半径)

布局背景是什么样子的

照片视图与图像的外观。


如您所见,它跨越了父对象的曲线边界。

我使用了
clipchildren=false
。没用still@pskink没有,关于我如何实现我的想法的任何信息?你找到解决方案了吗?你找到解决方案了吗?这仍然是一个问题=(
<LinearLayout
            android:outlineProvider="background"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/sheet_bg"
            android:orientation="vertical">

            <!-- including the photoview -->
            <include

                android:id="@+id/preview_layout_frame"
                layout="@layout/preview_snaped_helfie"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1" />


            <android.support.v7.widget.RecyclerView
                android:id="@+id/helfie_list"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:padding="20dp" />


        </LinearLayout>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/dark" />
    <!--<stroke-->
        <!--android:width="5dp"-->
        <!--android:color="@color/white" />-->
    <corners
        android:topLeftRadius="35dp"
        android:topRightRadius="35dp"

        />
</shape>