同心扩展渐消圆的Android动画

同心扩展渐消圆的Android动画,android,android-layout,android-animation,android-drawable,Android,Android Layout,Android Animation,Android Drawable,在安卓系统中,我正在寻找尽可能简单的“内置”方式,创建一个可绘制或自定义的视图,为4个半径缓慢扩展的同心圆设置动画 从哪里开始最好? 可以在纯XML中执行此操作吗? 如果不是,这可以使用单层可绘制文件来完成,还是应该使用多层可绘制文件 谢谢 最好的出发点是。这是一款适用于Android的易于配置的Ripple背景动画。插上电源,就可以开始了。以下是步骤: 要在安装后进行设置,请将RippleBackground添加到布局中,如下所示 <com.skyfishjy.library.Ripp

在安卓系统中,我正在寻找尽可能简单的“内置”方式,创建一个可绘制或自定义的视图,为4个半径缓慢扩展的同心圆设置动画

从哪里开始最好?
可以在纯XML中执行此操作吗?
如果不是,这可以使用单层可绘制文件来完成,还是应该使用多层可绘制文件


谢谢

最好的出发点是。这是一款适用于
Android
的易于配置的Ripple背景动画。插上电源,就可以开始了。以下是步骤:

要在安装后进行设置,请将
RippleBackground
添加到布局中,如下所示

<com.skyfishjy.library.RippleBackground
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/content"
    app:rb_color="#0099CC"
    app:rb_radius="32dp"
    app:rb_rippleAmount="4"
    app:rb_duration="3000"
    app:rb_scale="6">
    <ImageView
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_centerInParent="true"
        android:id="@+id/centerImage"
        android:src="@drawable/demoImage"/>
</com.skyfishjy.library.RippleBackground>
final RippleBackground rippleBackground=(RippleBackground)findViewById(R.id.content);
ImageView imageView=(ImageView)findViewById(R.id.centerImage);
imageView.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        rippleBackground.startRippleAnimation();
    }
});
调用方法
rippleBackground.stopRippleAnimation()
停止动画


希望能有所帮助。

最好的出发点是。这是一款适用于
Android
的易于配置的Ripple背景动画。插上电源,就可以开始了。以下是步骤:

要在安装后进行设置,请将
RippleBackground
添加到布局中,如下所示

<com.skyfishjy.library.RippleBackground
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/content"
    app:rb_color="#0099CC"
    app:rb_radius="32dp"
    app:rb_rippleAmount="4"
    app:rb_duration="3000"
    app:rb_scale="6">
    <ImageView
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_centerInParent="true"
        android:id="@+id/centerImage"
        android:src="@drawable/demoImage"/>
</com.skyfishjy.library.RippleBackground>
final RippleBackground rippleBackground=(RippleBackground)findViewById(R.id.content);
ImageView imageView=(ImageView)findViewById(R.id.centerImage);
imageView.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        rippleBackground.startRippleAnimation();
    }
});
调用方法
rippleBackground.stopRippleAnimation()
停止动画


希望能有所帮助。

试着浏览android阿森纳。这将是您寻找类似内容的最佳首选位置。尝试搜索动画可绘制内容。@swooby我也尝试这样做,但仅使用单层可绘制内容。虽然我不知道您是如何在可绘制xml中为每个项目列表设置动画的。我问了一个问题,但还没有回答。请help@SameerKhan1406抱歉,我仍然没有找到答案…但是…@swooby这应该会有帮助,试着看看android阿森纳。这将是您寻找类似内容的最佳首选位置。尝试搜索动画可绘制内容。@swooby我也尝试这样做,但仅使用单层可绘制内容。虽然我不知道您是如何在可绘制xml中为每个项目列表设置动画的。我问了一个问题,但还没有回答。请help@SameerKhan1406对不起,我还没有找到答案…但是…@swooby这应该会有帮助,