diff --git a/app/build.gradle b/app/build.gradle
index 3d8a44ad..37c77098 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -42,6 +42,7 @@ dependencies {
transitive = true
}
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
+ compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.3'
}
apply plugin: 'com.google.gms.google-services'
diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java
index 054f95cb..f0beabe1 100644
--- a/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java
+++ b/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java
@@ -11,9 +11,14 @@ import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.Toast;
+import java.io.IOException;
+
import gr.thmmy.mthmmy.R;
import gr.thmmy.mthmmy.activities.main.MainActivity;
import mthmmy.utils.Report;
+import pl.droidsonroids.gif.AnimationListener;
+import pl.droidsonroids.gif.GifDrawable;
+import pl.droidsonroids.gif.GifImageView;
import static gr.thmmy.mthmmy.session.SessionManager.CONNECTION_ERROR;
import static gr.thmmy.mthmmy.session.SessionManager.EXCEPTION;
@@ -86,6 +91,23 @@ public class LoginActivity extends BaseActivity {
overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
}
});
+
+
+ GifDrawable gifFromPath = null;
+ try {
+ gifFromPath = new GifDrawable( getResources(), R.drawable.logo_animated );
+ gifFromPath.setSpeed(0.75f);
+ gifFromPath.addAnimationListener(new AnimationListener() {
+ @Override
+ public void onAnimationCompleted(int loopNumber) {
+ recreate();
+ }
+ });
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ GifImageView gifImageView = (GifImageView) findViewById(R.id.logo);
+ gifImageView.setImageDrawable(gifFromPath);
}
@Override
diff --git a/app/src/main/res/drawable/logo_animated.gif b/app/src/main/res/drawable/logo_animated.gif
new file mode 100644
index 00000000..1bb1f385
Binary files /dev/null and b/app/src/main/res/drawable/logo_animated.gif differ
diff --git a/app/src/main/res/drawable/logo_try_no_letter.png b/app/src/main/res/drawable/logo_try_no_letter.png
deleted file mode 100644
index cfa00032..00000000
Binary files a/app/src/main/res/drawable/logo_try_no_letter.png and /dev/null differ
diff --git a/app/src/main/res/drawable/thmmy_material_somehow.png b/app/src/main/res/drawable/thmmy_material_somehow.png
deleted file mode 100644
index 027ac87f..00000000
Binary files a/app/src/main/res/drawable/thmmy_material_somehow.png and /dev/null differ
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
index 5228f8a0..0b147a93 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:fitsSystemWindows="true">
+ android:fitsSystemWindows="true"
+ android:background="@color/background">
+ android:layout_height="100dp"/>
-
-
-
+ android:layout_height="match_parent"
+ android:id="@+id/logo"
+ />
+ android:layout_height="50dp"/>