Java Code Examples for android.view.animation.AnimationSet#start()
The following examples show how to use
android.view.animation.AnimationSet#start() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlayVoiceView.java From imsdk-android with MIT License | 6 votes |
public void startBlinking() { Animation fadeIn = new AlphaAnimation(0.2f, 1f); fadeIn.setInterpolator(new DecelerateInterpolator()); //add this fadeIn.setDuration(1000); Animation fadeOut = new AlphaAnimation(1f, 0.2f); fadeOut.setInterpolator(new AccelerateInterpolator()); //and this fadeOut.setStartOffset(1000); fadeOut.setDuration(1000); final AnimationSet animationSet = new AnimationSet(false); animationSet.addAnimation(fadeIn); animationSet.addAnimation(fadeOut); animationSet.setRepeatCount(AnimationSet.INFINITE); animationSet.setRepeatMode(Animation.REVERSE); setAnimation(animationSet); animationSet.start(); }
Example 2
Source File: ExtendBaseView.java From imsdk-android with MIT License | 6 votes |
public void startAnimate(int count) { Animation fadeIn = new AlphaAnimation(0.2f, 1f); fadeIn.setInterpolator(new DecelerateInterpolator()); //add this fadeIn.setDuration(1000); Animation fadeOut = new AlphaAnimation(1f, 0.2f); fadeOut.setInterpolator(new AccelerateInterpolator()); //and this fadeOut.setStartOffset(1000); fadeOut.setDuration(1000); final AnimationSet animationSet = new AnimationSet(false); animationSet.addAnimation(fadeIn); animationSet.addAnimation(fadeOut); animationSet.setRepeatCount(count); animationSet.setRepeatMode(Animation.REVERSE); setAnimation(animationSet); animationSet.start(); }
Example 3
Source File: ParallaxedView.java From moviedb-android with Apache License 2.0 | 5 votes |
protected synchronized void animateNow() { View view = this.view.get(); if (view != null) { AnimationSet set = new AnimationSet(true); for (Animation animation : animations) if (animation != null) set.addAnimation(animation); set.setDuration(0); set.setFillAfter(true); view.setAnimation(set); set.start(); animations.clear(); } }
Example 4
Source File: ParallaxedView.java From ParallaxScroll with MIT License | 5 votes |
protected synchronized void animateNow() { View view = this.view.get(); if (view != null) { AnimationSet set = new AnimationSet(true); for (Animation animation : animations) if (animation != null) set.addAnimation(animation); set.setDuration(0); set.setFillAfter(true); view.setAnimation(set); set.start(); animations.clear(); } }
Example 5
Source File: LoginActivity.java From Twire with GNU General Public License v3.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); mLoginTextContainer = findViewById(R.id.login_text_container); mWebViewProgress = findViewById(R.id.SetupProgress); mWebViewContainer = findViewById(R.id.webview_container); mContinueFABContainer = findViewById(R.id.login_continue_circle_container); mGearIcon = findViewById(R.id.login_icon); mSuccessIcon = findViewById(R.id.login_icon_done); mContinueIcon = findViewById(R.id.forward_arrow); mLoginTextLineOne = findViewById(R.id.login_text_line_one); mLoginTextLineTwo = findViewById(R.id.login_text_line_two); mSuccessMessage = findViewById(R.id.login_success_message); mSkipText = findViewById(R.id.skip_text); loginWebView = findViewById(R.id.login_webview); mContinueFAB = findViewById(R.id.login_continue_circle); mContinueFABShadow = findViewById(R.id.login_continue_circle_shadow); mSuccessCircle = findViewById(R.id.login_success_circle); mSuccessCircleShadow = findViewById(R.id.login_success_shadow); mTransitionViewWhite = findViewById(R.id.transition_view); mTransitionViewBlue = findViewById(R.id.transition_view_blue); mSuccessMessage.setVisibility(View.INVISIBLE); mContinueIcon.setVisibility(View.INVISIBLE); mSuccessCircleShadow.setVisibility(View.INVISIBLE); mSuccessIcon.setVisibility(View.INVISIBLE); mSuccessCircle.setVisibility(View.INVISIBLE); mLoginTextLineOne.setVisibility(View.INVISIBLE); mLoginTextLineTwo.setVisibility(View.INVISIBLE); loginWebView.setVisibility(View.INVISIBLE); mGearIcon.setVisibility(View.INVISIBLE); mTransitionViewBlue.setVisibility(View.INVISIBLE); mTransitionViewWhite.setVisibility(View.INVISIBLE); mSkipText.setVisibility(View.INVISIBLE); checkSetupType(); float textPosition = (int) (2.5 * (getScreenHeight() / 5)); mLoginTextContainer.setY(textPosition); mSuccessMessage.setY(textPosition); mContinueFABContainer.setOnClickListener(v -> { showLoginView(); if (TwireApplication.isCrawlerUpdate) showSkippingAnimation(); }); Service.bringToBack(mTransitionViewWhite); Service.bringToBack(mTransitionViewBlue); mLoginTextLineOne.bringToFront(); mLoginTextLineTwo.bringToFront(); initSkipView(); setupPrelaunchLogin(); initSnackbar(); initLoginView(); showLogoAnimations(); showTextLineAnimations(mLoginTextLineOne, 1); showTextLineAnimations(mLoginTextLineTwo, 2); showTextLineAnimations(mSkipText, 2); AnimationSet animationSet = getContinueIconAnimations(270); int SHOW_CONTINUE_ICON_DELAY = 600; animationSet.setStartOffset(SHOW_CONTINUE_ICON_DELAY); animationSet.start(); }
Example 6
Source File: LoginActivity.java From Pocket-Plays-for-Twitch with GNU General Public License v3.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); trackEvent(R.string.category_read, R.string.action_login); mLoginTextContainer = findViewById(R.id.login_text_container); mWebViewProgress = findViewById(R.id.SetupProgress); mWebViewContainer = findViewById(R.id.webview_container); mContinueFABContainer = findViewById(R.id.login_continue_circle_container); mGearIcon = findViewById(R.id.login_icon); mSuccessIcon = findViewById(R.id.login_icon_done); mContinueIcon = findViewById(R.id.forward_arrow); mLoginTextLineOne = findViewById(R.id.login_text_line_one); mLoginTextLineTwo = findViewById(R.id.login_text_line_two); mSuccessMessage = findViewById(R.id.login_success_message); mSkipText = findViewById(R.id.skip_text); loginWebView = findViewById(R.id.login_webview); mContinueFAB = findViewById(R.id.login_continue_circle); mContinueFABShadow = findViewById(R.id.login_continue_circle_shadow); mSuccessCircle = findViewById(R.id.login_success_circle); mSuccessCircleShadow = findViewById(R.id.login_success_shadow); mTransitionViewWhite = findViewById(R.id.transition_view); mTransitionViewBlue = findViewById(R.id.transition_view_blue); mSuccessMessage .setVisibility(View.INVISIBLE); mContinueIcon .setVisibility(View.INVISIBLE); mSuccessCircleShadow.setVisibility(View.INVISIBLE); mSuccessIcon .setVisibility(View.INVISIBLE); mSuccessCircle .setVisibility(View.INVISIBLE); mLoginTextLineOne .setVisibility(View.INVISIBLE); mLoginTextLineTwo .setVisibility(View.INVISIBLE); loginWebView .setVisibility(View.INVISIBLE); mGearIcon .setVisibility(View.INVISIBLE); mTransitionViewBlue .setVisibility(View.INVISIBLE); mTransitionViewWhite.setVisibility(View.INVISIBLE); mSkipText .setVisibility(View.INVISIBLE); checkSetupType(); float textPosition = (int) (2.5 * (getScreenHeight() / 5)); mLoginTextContainer .setY(textPosition); mSuccessMessage .setY(textPosition); mContinueFABContainer.setOnClickListener(v -> { showLoginView(); if (PocketPlaysApplication.isCrawlerUpdate) showSkippingAnimation(); }); Service.bringToBack(mTransitionViewWhite); Service.bringToBack(mTransitionViewBlue); mLoginTextLineOne .bringToFront(); mLoginTextLineTwo .bringToFront(); initSkipView(); setupPrelaunchLogin(); initSnackbar(); initLoginView(); showLogoAnimations(); showTextLineAnimations(mLoginTextLineOne, 1); showTextLineAnimations(mLoginTextLineTwo, 2); showTextLineAnimations(mSkipText, 2); AnimationSet animationSet = getContinueIconAnimations(270); animationSet.setStartOffset(SHOW_CONTINUE_ICON_DELAY); animationSet.start(); }