New login anim activity
authorDa Risk <darisk972@gmail.com>
Fri, 20 Nov 2009 21:44:52 +0100
changeset 540 45ee3f1b43ab
parent 536 537ddd8aa407
child 541 a4bbfbfb586c
New login anim activity
AndroidManifest.xml
res/anim/rotate_and_scale.xml
res/layout/login_anim.xml
src/com/beem/project/beem/ui/LoginAnim.java
--- a/AndroidManifest.xml	Thu Nov 19 19:01:21 2009 +0100
+++ b/AndroidManifest.xml	Fri Nov 20 21:44:52 2009 +0100
@@ -16,6 +16,18 @@
 					android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
 			</intent-filter>
 		</activity>
+		
+		<activity android:name=".ui.LoginAnim" android:label="ANIM"
+			android:launchMode="singleTask">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+			<intent-filter android:label="Beem Connection">
+				<action
+					android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
+			</intent-filter>
+		</activity>
 		<activity android:name=".ui.Settings" android:label="@string/edit_settings_name">
 			<intent-filter android:label="Beem Connection">
 				<action
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/res/anim/rotate_and_scale.xml	Fri Nov 20 21:44:52 2009 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <scale android:fromXScale="0.5" android:toXScale="1.0"
+	android:fromYScale="0.5" android:toYScale="1.0"
+	android:pivotX="50%" android:pivotY="50%" 
+	android:repeatMode="reverse" android:duration="8000"
+	android:repeatCount="infinite" />
+    <rotate android:fromDegrees="0" android:toDegrees="360"
+	android:pivotX="50%" android:pivotY="50%"
+	android:duration="5000"
+	android:repeatMode="restart"
+	android:repeatCount="infinite" />
+</set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/login_anim.xml	Fri Nov 20 21:44:52 2009 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="fill_parent"
+    android:layout_width="fill_parent"
+    android:orientation="vertical" >
+    <ImageView android:id="@+id/logo_anim" android:src="@drawable/beem_launcher_icon_color" android:layout_height="fill_parent" android:layout_width="fill_parent" 
+	android:layout_weight="1"/>
+    <!-- TODO traduction -->
+    <Button android:layout_height="wrap_content" android:layout_width="fill_parent"
+	android:layout_gravity="bottom"
+	android:text="Cancel" />
+</LinearLayout>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/LoginAnim.java	Fri Nov 20 21:44:52 2009 +0100
@@ -0,0 +1,45 @@
+package com.beem.project.beem.ui;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.animation.Animation;
+import android.widget.ImageView;
+import android.view.animation.AnimationUtils;
+import com.beem.project.beem.R;
+
+/**
+ * This class is an activity which display an animation during the connection
+ * with the server.
+ * @author Da Risk <darisk972@gmail.com>
+ */
+public class LoginAnim extends Activity {
+
+    private ImageView mLogo;
+    private Animation mRotateAnim;
+    /**
+     * Constructor.
+     */
+    public LoginAnim() {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+	super.onCreate(savedInstanceState);
+	setContentView(R.layout.login_anim);
+	mLogo = (ImageView) findViewById(R.id.logo_anim);
+	mRotateAnim = AnimationUtils.loadAnimation(this, R.anim.rotate_and_scale);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void onStart() {
+	super.onStart();
+        mLogo.startAnimation(mRotateAnim);
+    }
+
+}