Search in sources :

Example 1 with AnimatedVectorDrawable

use of android.graphics.drawable.AnimatedVectorDrawable in project Signal-Android by WhisperSystems.

the class AudioView method togglePauseToPlay.

private void togglePauseToPlay() {
    controlToggle.displayQuick(playButton);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        AnimatedVectorDrawable pauseToPlayDrawable = (AnimatedVectorDrawable) getContext().getDrawable(R.drawable.pause_to_play_animation);
        playButton.setImageDrawable(pauseToPlayDrawable);
        pauseToPlayDrawable.start();
    }
}
Also used : AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable)

Example 2 with AnimatedVectorDrawable

use of android.graphics.drawable.AnimatedVectorDrawable in project Signal-Android by WhisperSystems.

the class AudioView method togglePlayToPause.

private void togglePlayToPause() {
    controlToggle.displayQuick(pauseButton);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        AnimatedVectorDrawable playToPauseDrawable = (AnimatedVectorDrawable) getContext().getDrawable(R.drawable.play_to_pause_animation);
        pauseButton.setImageDrawable(playToPauseDrawable);
        playToPauseDrawable.start();
    }
}
Also used : AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable)

Example 3 with AnimatedVectorDrawable

use of android.graphics.drawable.AnimatedVectorDrawable in project animate by hitherejoe.

the class AnimatedVectorDrawablesActivity method onTwitterHeartImageClick.

@OnClick(R.id.image_twitter_heart)
public void onTwitterHeartImageClick() {
    AnimatedVectorDrawable drawable = mIsTwitterState ? mHeartToTwitterDrawable : mTwitterToHeartDrawable;
    mTwitterHeartImage.setImageDrawable(drawable);
    drawable.start();
    mIsTwitterState = !mIsTwitterState;
}
Also used : AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable) OnClick(butterknife.OnClick)

Example 4 with AnimatedVectorDrawable

use of android.graphics.drawable.AnimatedVectorDrawable in project plaid by nickbutcher.

the class HomeActivity method revealPostingProgress.

void revealPostingProgress() {
    Animator reveal = ViewAnimationUtils.createCircularReveal(fabPosting, (int) fabPosting.getPivotX(), (int) fabPosting.getPivotY(), 0f, fabPosting.getWidth() / 2).setDuration(600L);
    reveal.setInterpolator(AnimUtils.getFastOutLinearInInterpolator(this));
    reveal.start();
    AnimatedVectorDrawable uploading = (AnimatedVectorDrawable) getDrawable(R.drawable.avd_uploading);
    if (uploading != null) {
        fabPosting.setImageDrawable(uploading);
        uploading.start();
    }
}
Also used : Animator(android.animation.Animator) AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable)

Example 5 with AnimatedVectorDrawable

use of android.graphics.drawable.AnimatedVectorDrawable in project plaid by nickbutcher.

the class PlayerSheet method showClose.

private void showClose() {
    if (dismissState == DISMISS_CLOSE)
        return;
    dismissState = DISMISS_CLOSE;
    final AnimatedVectorDrawable downToClose = (AnimatedVectorDrawable) ContextCompat.getDrawable(this, R.drawable.avd_down_to_close);
    close.setImageDrawable(downToClose);
    downToClose.start();
}
Also used : AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable)

Aggregations

AnimatedVectorDrawable (android.graphics.drawable.AnimatedVectorDrawable)56 Drawable (android.graphics.drawable.Drawable)18 TextView (android.widget.TextView)9 Resources (android.content.res.Resources)8 Button (android.widget.Button)8 GridLayout (android.widget.GridLayout)8 ScrollView (android.widget.ScrollView)8 SuppressLint (android.annotation.SuppressLint)5 ColorDrawable (android.graphics.drawable.ColorDrawable)5 InsetDrawable (android.graphics.drawable.InsetDrawable)5 ImageView (android.widget.ImageView)5 Paint (android.graphics.Paint)4 Animatable2 (android.graphics.drawable.Animatable2)4 BitmapDrawable (android.graphics.drawable.BitmapDrawable)4 LayerDrawable (android.graphics.drawable.LayerDrawable)4 AttributeSet (android.util.AttributeSet)4 IOException (java.io.IOException)4 DecimalFormat (java.text.DecimalFormat)4 XmlPullParser (org.xmlpull.v1.XmlPullParser)4 XmlPullParserException (org.xmlpull.v1.XmlPullParserException)4