Skip to content

Pages and Transitions Spec

iBeliever edited this page Dec 17, 2014 · 7 revisions

Requirements

  • By default, simple slide transition to next page

  • When using the card page style, the card overlays the toolbar and the actions are displayed in the card

  • The app can define complex transitions from the tapped view to the new page (Material Design example)

  • Different toolbar layouts (see the Material Design spec)

    • Standard app bar

    • Expanded height

    • Card overlay

    • Floating toolbar

    • Split-column toolbars

    • Transparent toolbars

    • Custom content

Relevant Android docs

Ideas

  • Use transition classes to handle the transitions

  • Uses QtQuick states & transitions to handle the transitions

    • A limitation of states & transitions is that we can't animate to or from anchors really easily. So the actual layout would need to use x, y, width, and height.

Possible API

Page {

    // A group property for customizing the page's app bar
    appbar {
        // Hide the app bar, for a custom toolbar or just to hide it
        property bool hidden 
        
        // Override the default color of the app bar
        property color backgroundColor 
        
        // Set up content for an extended header. Hides the default title label
        property Item extendedContent
        
        // Set up content to replace the default title label
        property Item content
    }
    
    // Display the page styled as a card
    property bool cardStyle
}

Clone this wiki locally