new attach icon

fancier interpolation

Closes #3205
// FREEBIE
This commit is contained in:
Jake McGinty
2015-05-20 14:18:39 -07:00
committed by Moxie Marlinspike
parent fe4e2fcadb
commit bd6bee8da7
12 changed files with 16 additions and 13 deletions

View File

@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.components;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
@@ -54,6 +55,7 @@ public class AnimatingToggle extends FrameLayout {
private void animateOut(int viewIndex, TranslateAnimation animation) {
final View view = getChildAt(viewIndex);
animation.setInterpolator(new FastOutSlowInInterpolator());
animation.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
@@ -73,6 +75,7 @@ public class AnimatingToggle extends FrameLayout {
}
private void animateIn(int viewIndex, TranslateAnimation animation) {
animation.setInterpolator(new FastOutSlowInInterpolator());
final View view = getChildAt(viewIndex);
view.setVisibility(View.VISIBLE);
view.startAnimation(animation);