Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3943086
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:44:25+00:00 2026-05-20T00:44:25+00:00

Recently I am giving another shot to Dashcode ;) It’s great. Is just I

  • 0

Recently I am giving another shot to Dashcode 😉

It’s great. Is just I think is not well documented.
I have a stackLayout object with only two views in it, and a couple of buttons that interchange the views with a transition.(views show data of a large array, list)
Animations and transitions work perfect. The problem is, when I press a button while animating the animation starts again and it looks ugly (If I had n views for a datasource array of length n this should’t be a problem, but this is not my case).

I want to disable buttons while animation is taking place.

Is there any callback, delegate, or any way I can get a notification when the animation is finished?

This is what I have done:

function _changeView(transitionDirection, newIndex){

    //Create transition
    var newTransition = new Transition(Transition.SWAP_TYPE, 0.9, Transition.EASE_TIMING);
    newTransition.direction = transitionDirection;

    //I only have two views. I use currentView's id to calculate not current view id and change text inside of it. 
    var stackLayout = document.getElementById('stackLayout').object;//stackLayout object
    var nextViewId = (stackLayout.getCurrentView().id == 'view1')? '2':'1'; //

    //change the text in the view that is going to appear   
    document.getElementById('text'+nextViewId).innerHTML = list[curIndex];

    stackLayout.setCurrentViewWithTransition('view'+ nextViewId, newTransition, false);
}

function goPrevious(event)
{
    curIndex--;
    if(curIndex < 0){ 
        curIndex = list.length-1;
    }
    _changeView(Transition.LEFT_TO_RIGHT_DIRECTION, curIndex);
}

function goNext(event)
{
    curIndex++;
    if(curIndex >list.length - 1){ 
        curIndex = 0;
    }
    _changeView(Transition.RIGHT_TO_LEFT_DIRECTION, curIndex);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:44:26+00:00Added an answer on May 20, 2026 at 12:44 am

    Eventually found the answer to this. Here’s how I did it:

    document.getElementById('stackLayout').object.endTransitionCallback=function(stackLayout, oldView, newView) {
        //PUT CODE HERE USING stackLayout, oldView, newView to show params
    }
    

    In fact you can find all the stackLayout methods and properties in the StackLayout.js file in your project!!

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a recursive template definition (I just made up that term). I think
Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my
I have recently started using the -Wall compiler switch in an attempt to improve
Recently I have been refactoring some of my C# code and I found a
Recently I have been furthering my knowledge of Javascript, by combining the Processing.js and
Recently Jeff has posted regarding his trouble with database deadlocks related to reading. Multiversion
Recently, I started changing some of our applications to support MS SQL Server as
Recently, I've been dealing with an error with accessing MAPI via the .NET framework
Recently our site has been deluged with the resurgence of the Asprox botnet SQL
Recently I had to develop a SharePoint workflow, and I found the experience quite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.