[Interest] Standardized StackView navigation

Ben Lau xbenlau at gmail.com
Tue Jan 19 08:11:32 CET 2016


Beside those signals, transition effect should be able to set per view.

In fact, I have already did similar thing in QuickAndroid project. I call
it PageStack.

https://github.com/benlau/quickandroid/blob/master/QuickAndroid/Page.qml
https://github.com/benlau/quickandroid/blob/master/QuickAndroid/PageStack.qml

However, entered/exited signals are not enough. I further break down into
appear / disappear / present / dismiss signals. And it is emitted by Page
component instead of PageStack. Becoz Page component usually need this
those signals to refresh / save content.





On 19 January 2016 at 01:23, Jason H <jhihn at gmx.com> wrote:

> What are your thoughts with extending StackView (maybe a derived class
> called 'ScreenStack' or 'ActivityStack')
>
> I've done a number of mobile-paradigm based apps, and seem to be
> convergently evolving the same pattern.
>
> main.qml {
> ScreenStack {}
> Screen1 {}
> Screen2 {}
> Screen3 {}
> Screen4 {}
> }
>
> Screen.qml {
> visible: false
> // lifecycle
> signal created();
> signal entered();
> signal exited();
> signal destroyed();
> // navigation
> signal next();
> signal back();
> }
>
> ScreenX.qml {
>  Screen {
>  }
> }
>
> Which is similar to android, minus the pause/resume. (
> http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
> )
>
> I figure it would be cool to have a 'ScreenView' that would properly
> instrument the lifecycle, and potentially the navigation.
> Currently, I implement entered/exited with onVisibleChanged, destroyed is
> not implemented, and created is Component.onCompleted.
>
> I also have used this to implement dynamic workflows. To avoid Apple app
> store restrictions, a JSON object was retrieved from the server which
> contained the names of QML files, which existed locally in the application,
> with a trivial decision tree to decide the next screen. In this case, each
> screen was dynamically created.
>
> Thoughts?
>
>
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160119/6a47ae19/attachment.html>


More information about the Interest mailing list