'Android/Animation'에 해당되는 글 1건

  1. 2014.03.03 Listview Animation
2014.03.03 15:26

/res/anim/listview_anim.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?xml version="1.0" encoding="utf-8"?>
    android:interpolator="@android:anim/accelerate_decelerate_interpolator">
    <translate
        android:fromYDelta="-100%"
        android:toYDelta="0"
        android:duration="300">
    </translate>
    <alpha
        android:fromAlpha="0.0"
        android:toAlpha="1.0"
        android:duration="600">
    </alpha>
</set>



/res/anim/listview_anim_control.xml

1
2
3
4
5
6
<?xml version="1.0" encoding="utf-8"?>
<layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android"
    android:delay="20%"
    android:animationOrder="normal"
    android:animation="@anim/listview_anim">
</layoutAnimation>



/res/layout/listview_layout.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#ff000000">
    <ListView
        android:id="@+id/list1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:divider="@color/list_divider"
        android:dividerHeight="1dp"
        android:smoothScrollbar="true"
        android:fastScrollEnabled="true"
        android:persistentDrawingCache="animation|scrolling"
        android:layoutAnimation="@anim/listview_anim_control"/>
</LinearLayout>


출저: 옥수수농장 http://ocsoosoo.tistory.com/117

저작자 표시
신고

'Android > Animation' 카테고리의 다른 글

Listview Animation  (0) 2014.03.03
Posted by hoonihoon85 hoonihoon

티스토리 툴바