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();//開始播放動畫,動畫播放時長2500ms,預設2000
}
}, );
項目位址:
https://github.com/wangpeiming110/EnterAnimation
如果覺得對你有用,請在github上star一個,O(∩_∩)O謝謝