quickandroid icon indicating copy to clipboard operation
quickandroid copied to clipboard

Animated menu back button.

Open molchanoviv opened this issue 9 years ago • 1 comments

Hello @benlau Thank you for quick update of qpm version. But I also have a question. I want to use this animated menu back icon https://gist.github.com/cyberbobs/8d62ab257d332914a72c instead of the static one from ActionBar. How I can do this without copying all the action bar contents to my project and adding it there.

P.S. Thank you for such a great project. It really helpful.

molchanoviv avatar Jan 16 '16 08:01 molchanoviv

Hi @molchanoviv,

It is a bit tricky to do so. It need to set following things:

  1. iconSource to empty string
  2. Set keyline1 from 16dp to 72dp.
  3. Place your custom icon over Action Bar.

Example (Modified from example program - Components.qml):

    actionBar: ActionBar {
        id : actionBar
//        iconSource: A.drawable("ic_menu",Constants.black87)
        title: "Component List"
        showIcon: true
        iconSource: ""
        actionButtonEnabled: false

        material : ActionBarMaterial {
            Component.onCompleted: {
                merge(this,ThemeManager.currentTheme.actionBar);
                keyline1 = 72 * A.dp;
            }
        }

        Rectangle {
            width: 48 * A.dp
            height: parent.height
            color: "red"
            opacity: 0.5
            NumberAnimation on rotation {
                duration: 400
                from: 0
                to : 360
                loops: Animation.Infinite;
                easing.type: Easing.Linear
            }
        }
    }

By the way, I will add custom icon component in next release.

benlau avatar Jan 26 '16 09:01 benlau