diff options
author | Andrew Dolgov <[email protected]> | 2013-05-28 12:55:21 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-28 12:55:21 +0400 |
commit | 216eecc96a916568b3db5c5bb9a9083789cd262b (patch) | |
tree | 6c2d8b2ea1a047684edd7bb5f57037f1ca955ead /res | |
parent | ab4480c6f5f1e772ee2f24bd09457d95d4608365 (diff) |
add fancy animations for headlines list
Diffstat (limited to 'res')
-rw-r--r-- | res/anim/headline_item.xml | 14 | ||||
-rw-r--r-- | res/anim/layout_headline.xml | 5 | ||||
-rw-r--r-- | res/layout/headlines_fragment.xml | 46 |
3 files changed, 53 insertions, 12 deletions
diff --git a/res/anim/headline_item.xml b/res/anim/headline_item.xml new file mode 100644 index 00000000..dbb60d23 --- /dev/null +++ b/res/anim/headline_item.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
+ <alpha
+ android:fromAlpha="0"
+ android:toAlpha="1"
+ android:duration="250"
+ />
+ <translate
+ android:fromXDelta="100%p"
+ android:toXDelta="0"
+ android:duration="250"
+ />
+</set>
+
diff --git a/res/anim/layout_headline.xml b/res/anim/layout_headline.xml new file mode 100644 index 00000000..07b84d11 --- /dev/null +++ b/res/anim/layout_headline.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?>
+<layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android"
+ android:delay="20%"
+ android:animation="@anim/headline_item"
+/>
\ No newline at end of file diff --git a/res/layout/headlines_fragment.xml b/res/layout/headlines_fragment.xml index 787a8c8d..58fa6694 100644 --- a/res/layout/headlines_fragment.xml +++ b/res/layout/headlines_fragment.xml @@ -1,17 +1,39 @@ -<?xml version="1.0" encoding="utf-8" ?>
-
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/headlines_fragment"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="5dp" >
- - <ListView android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/headlines"></ListView> - <LinearLayout android:id="@+id/loading_container" android:gravity="center" android:layout_height="match_parent" android:layout_width="match_parent">
- <TextView android:layout_width="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/loading_message" android:layout_height="wrap_content" ></TextView>
+
+ <ListView
+ android:id="@+id/headlines"
+ android:layout_width="match_parent"
+ android:layoutAnimation="@anim/layout_headline"
+ android:layout_height="match_parent" >
+ </ListView>
+
+ <LinearLayout
+ android:id="@+id/loading_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center" >
+
+ <TextView
+ android:id="@+id/loading_message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceLarge" >
+ </TextView>
</LinearLayout>
- <TextView android:id="@+id/no_headlines"
- android:visibility="invisible"
- android:layout_gravity="center"
- android:textAppearance="?android:attr/textAppearanceLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/no_headlines"></TextView>
-
- </FrameLayout>
+
+ <TextView
+ android:id="@+id/no_headlines"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/no_headlines"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:visibility="invisible" >
+ </TextView>
+
+</FrameLayout>
\ No newline at end of file |