Removed library and improved advanced settings

This commit is contained in:
Michael Schättgen 2018-04-05 00:15:16 +02:00
parent 211f228efa
commit ec9581e0c4
2 changed files with 26 additions and 8 deletions

View file

@ -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); RelativeLayout header=(RelativeLayout) findViewById(R.id.accordian_header);
//to toggle content //to toggle content
@ -122,6 +122,10 @@ public class EditProfileActivity extends AegisActivity {
fadeOut.setDuration(220); // Fadeout duration should be 1000 milli seconds fadeOut.setDuration(220); // Fadeout duration should be 1000 milli seconds
header.startAnimation(fadeOut); 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() { fadeOut.setAnimationListener(new Animation.AnimationListener() {
@Override @Override
public void onAnimationStart(Animation animation) { public void onAnimationStart(Animation animation) {
@ -131,7 +135,24 @@ public class EditProfileActivity extends AegisActivity {
@Override @Override
public void onAnimationEnd(Animation animation) { public void onAnimationEnd(Animation animation) {
header.setVisibility(View.GONE); 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 @Override

View file

@ -101,14 +101,11 @@
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
<com.github.aakira.expandablelayout.ExpandableRelativeLayout <RelativeLayout
android:id="@+id/expandableLayout" android:id="@+id/expandableLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:ael_expanded="false" android:visibility="invisible">
app:ael_duration="100"
app:ael_interpolator="accelerate"
app:ael_orientation="vertical">
<TableLayout <TableLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -231,7 +228,7 @@
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
</TableRow> </TableRow>
</TableLayout> </TableLayout>
</com.github.aakira.expandablelayout.ExpandableRelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>