/
activity_state_animation.xml
47 lines (41 loc) · 1.64 KB
/
activity_state_animation.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.ocnyang.stateanimation.StateAnimationActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"/>
<TextView
android:id="@+id/view_puppet1"
android:layout_width="200dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal"
android:layout_margin="15dp"
android:background="@android:color/white"
android:clickable="true"
android:stateListAnimator="@anim/anim_view_state_change"/>
<TextView
android:id="@+id/view_puppet2"
android:layout_width="200dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal"
android:layout_margin="15dp"
android:background="@android:color/white"
android:clickable="true"/>
<View
android:id="@+id/view_puppet3"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_gravity="center_horizontal"
android:layout_margin="15dp"
android:background="@drawable/bg_animated_statelist_drawable"
android:clickable="true"/>
</LinearLayout>