我正在使用翻译动画将一个鸡蛋(ImageButton)移到纸箱外(ImageView),但它一直是剪辑,所以我查看了遍历stackoverflow以找到解决方案,但在尝试实施所有解决方案后,它仍然是裁剪.
任何人都可以解释为什么我的仍然是剪辑,这是XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:gravity="top"
android:clipChildren="false"
android:clipToPadding="false"
android:layout_height="match_parent">
<ImageButton
android:id="@+id/imageButton1"
android:background="@drawable/transparentblackbackground"
android:layout_below="@+id/relativeLayout1"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:clipChildren="false" android:clipToPadding="false" >
</ImageButton>
<!-- Total Carton for Animation -->
<RelativeLayout
android:orientation="vertical"
android:layout_width="440dp"
android:id="@+id/opencarton"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:clipChildren="false"
android:clipToPadding="false" >
<!-- The carton that holds the eggs -->
<RelativeLayout
android:orientation="vertical"
android:layout_width="260dp"
android:id="@+id/opencarton"
android:layout_height="512dp"
android:layout_centerInParent="true"
android:clipChildren="false"
android:clipToPadding="false">
<ImageButton
android:id="@+id/blackbgnd"
android:background="@drawable/clearbackground"
android:layout_height="600dp"
android:layout_width="400dp"
android:clipChildren="false"
android:clipToPadding="false"
android:gravity="center">
</ImageButton>
<!-- Top of Carton image -->
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/topcomponent"
android:src="@drawable/topofcarton"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:clipChildren="false"
android:clipToPadding="false">
</ImageView>
<!-- …Run Code Online (Sandbox Code Playgroud)