From ec9581e0c4e1f599ffe8d8095a85af914c43cca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4ttgen?= Date: Thu, 5 Apr 2018 00:15:16 +0200 Subject: [PATCH] Removed library and improved advanced settings --- .../me/impy/aegis/ui/EditProfileActivity.java | 25 +++++++++++++++++-- .../main/res/layout/activity_edit_profile.xml | 9 +++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/me/impy/aegis/ui/EditProfileActivity.java b/app/src/main/java/me/impy/aegis/ui/EditProfileActivity.java index 934d9f9e..2b947818 100644 --- a/app/src/main/java/me/impy/aegis/ui/EditProfileActivity.java +++ b/app/src/main/java/me/impy/aegis/ui/EditProfileActivity.java @@ -110,7 +110,7 @@ public class EditProfileActivity extends AegisActivity { }); - ExpandableRelativeLayout content=(ExpandableRelativeLayout) findViewById(R.id.expandableLayout); + RelativeLayout expandableLayout = findViewById(R.id.expandableLayout); RelativeLayout header=(RelativeLayout) findViewById(R.id.accordian_header); //to toggle content @@ -122,6 +122,10 @@ public class EditProfileActivity extends AegisActivity { fadeOut.setDuration(220); // Fadeout duration should be 1000 milli seconds header.startAnimation(fadeOut); + Animation fadeIn = new AlphaAnimation(0, 1); // the 1, 0 here notifies that we want the opacity to go from opaque (1) to transparent (0) + fadeIn.setInterpolator(new AccelerateInterpolator()); + fadeIn.setDuration(250); // Fadeout duration should be 1000 milli seconds + fadeOut.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { @@ -131,7 +135,24 @@ public class EditProfileActivity extends AegisActivity { @Override public void onAnimationEnd(Animation animation) { header.setVisibility(View.GONE); - content.toggle(); + expandableLayout.startAnimation(fadeIn); + } + + @Override + public void onAnimationRepeat(Animation animation) { + + } + }); + + fadeIn.setAnimationListener(new Animation.AnimationListener() { + @Override + public void onAnimationStart(Animation animation) { + + } + + @Override + public void onAnimationEnd(Animation animation) { + expandableLayout.setVisibility(View.VISIBLE); } @Override diff --git a/app/src/main/res/layout/activity_edit_profile.xml b/app/src/main/res/layout/activity_edit_profile.xml index cbcf3377..6b7f106b 100644 --- a/app/src/main/res/layout/activity_edit_profile.xml +++ b/app/src/main/res/layout/activity_edit_profile.xml @@ -101,14 +101,11 @@ android:textStyle="bold" /> - + android:visibility="invisible"> - +