尝试以下操作
在您的活动java中
circle2 = (ImageView) findViewById(R.id.circle2);
ScaleAnimation fade_in = new ScaleAnimation(0f, 1f, 0f, 1f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
fade_in.setDuration(1000); // animation duration in milliseconds
fade_in.setFillAfter(true); // If fillAfter is true, the transformation that this animation performed will persist when it is finished.
circle2.startAnimation(fade_in);
活动xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
>
<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:background="@drawable/circle" />
<ImageView
android:id="@+id/circle2"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="@drawable/circle_two" />
</FrameLayout>
在你的画圈里。xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="oval">
<solid android:color="@color/colorAccent" />
</shape>
</item>
<item>
<shape android:shape="oval">
<solid android:color="@color/colorAccent" />
</shape>
</item>
</selector>
类似地创建圆圈2。xml