Apache License 2.0

项目介绍

wangpeiming110/EnterAnimation 是一个托管在 GitHub 上的开源项目,主要使用 Java 编写,采用 Apache License 2.0 许可证,目前获得 400 个 Star、75 次 Fork。

仓库全名
wangpeiming110/EnterAnimation
开源许可证
Apache License 2.0
Star 数
400
Fork 数
75
未关闭 Issue
3

README 摘要

EnterAnimation android 仿ppt进入/退出/转场动画,入场/出场动画效果合集, 百叶窗效果,擦除效果,盒状效果,阶梯效果,菱形效果,轮子效果,劈裂效果,棋盘效果, 切入效果,扇形展开效果,十字扩展效果,随机线条效果,向内溶解效果,圆形扩展效果, 适用于各种view和viewgroup,activity即用于页面根部viewgroup, 自定义viewgroup自动换行layout, 看效果图 Series of entry/exit animation effects just like ppt in Android. There are effects of Blinds, Wipe, Box, Strips, Diamond, Wheel, Split, Checkerboard, Peek In, Wedge, Plus, Random Bars, Dissolve In, Circle. The…

完整内容见 GitHub 原始 README 或本页 。

常见问题

EnterAnimation 用什么语言开发?

主要使用 Java 编写,采用 Apache License 2.0 许可证,目前有 400 个 Star。

EnterAnimation 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 EnterAnimation 的源码?

可以直接克隆仓库:git clone https://github.com/wangpeiming110/EnterAnimation.git;安装与运行步骤见仓库 README。

EnterAnimation 最近还在维护吗?

仓库最近一次更新为 2023年2月23日,当前有 3 个未关闭 Issue;Star 数为 400,可作为社区活跃度的参考。

README

EnterAnimation

android 仿ppt进入/退出/转场动画,入场/出场动画效果合集, 百叶窗效果,擦除效果,盒状效果,阶梯效果,菱形效果,轮子效果,劈裂效果,棋盘效果, 切入效果,扇形展开效果,十字扩展效果,随机线条效果,向内溶解效果,圆形扩展效果, 适用于各种view和viewgroup,activity即用于页面根部viewgroup, 自定义viewgroup自动换行layout, 看效果图

Series of entry/exit animation effects just like ppt in Android. There are effects of Blinds, Wipe, Box, Strips, Diamond, Wheel, Split, Checkerboard, Peek In, Wedge, Plus, Random Bars, Dissolve In, Circle. The Animation effects can apply to any View or ViewGroup. There is also a custom ViewGroup of auto linefeed called SimpleLineWrapLayout to layout the buttons. Please take a look at the images:

Attributes

There are several attributes you can set:

attr 属性 description 描述
isVisibleAtFirst 进入页面时视图内容是否可见,默认可见

How to use

layout:

在需要显示动画效果的view或viewgroup的外层包一个EnterAnimLayout,然后在java中设置具体动画和控制开始播放动画;需要播放整个activity的话同理在最外层加一个EnterAnimLayout,然后在java中设置具体动画和控制开始播放动画

        <com.wangpm.enteranimation.EnterAnimLayout
            android:id="@+id/anim_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:background="@android:color/holo_blue_bright"
            android:padding="20dp"
            >
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:background="@android:color/holo_orange_light">
                <TextView
                    android:id="@+id/text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="EnterAnimTextView"
                    android:textSize="30sp"
                    />
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal">
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@mipmap/ic_launcher"
                        />
                    <Button
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="这就是一个按钮"/>
                </LinearLayout>

            </LinearLayout>
        </com.wangpm.enteranimation.EnterAnimLayout>
java:
        enterAnimLayout = (EnterAnimLayout)  findViewById(R.id.anim_layout);
	    //oncreate中还并未获得view的具体尺寸,所以打开页面时延迟播放动画
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
			    //举例设置成百叶窗动画
                Anim anim = new AnimBaiYeChuang(enterAnimLayout);
                anim.startAnimation(2500);//开始播放动画,动画播放时长2500ms,默认2000
            }
        }, 1000);

Release Notes

[2.0.0] - 2023-02-03

Change

  • Support exit animations of kinds of effects #8 #7 #6 #2
  • Fix interrupting active animation #5

[1.0.0] - 2017-07-19

  • Support enter animations of kinds of effects

评论

暂无评论