Git Product home page Git Product logo

hupeng0605 / enteranimation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangpeiming110/enteranimation

0.0 2.0 1.0 1.07 MB

android 仿ppt进入动画效果合集,自定义view实现动画,百叶窗效果,擦除效果,盒状效果,阶梯效果,菱形效果,轮子效果,劈裂效果,棋盘效果,切入效果,扇形展开效果,十字扩展效果,随机线条效果,向内溶解效果,圆形扩展效果,适用于任何view和viewgroup,activity即用于页面根部viewgroup,自定义viewgroup自动换行layout,看效果图 Series of entrance 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. look the images:

Java 100.00%

enteranimation's Introduction

EnterAnimation

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

Series of entrance 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. look 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);

enteranimation's People

Contributors

wangpeiming110 avatar

Watchers

 avatar  avatar

Forkers

zouhengheng

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.