0
我找不到这种情况的任何地方。 我在RelativeLayout中有两个视图。自定义RelativeLayout与动画中的两个视图
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent">
<View
android:id="@+id/view_mask1"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/tutrial_icon_bg_circle"
android:layout_centerInParent="true"
android:visibility="visible"/>
<View
android:id="@+id/view_mask"
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/tutorial_icon_bg"
android:layout_centerInParent="true"
android:visibility="visible"/>
</RelativeLayout>
此外,我对这个意见有两种不同的动画。当我在一个活动中设置动画时,动画效果很好。 现在是问题的时候了,我想在我想要的地方使用这个视图。因为我不想一次又一次地设置所有动画。我想在这样的适配器中使用;
View v = inflater.inflate(R.layout.animation_layout, null);
LinearLayout ll =(LinearLayout) findViewById(R.id.layout);
ll.addView(v);
所以,我想我必须创建一个customView但是如何?