quickandroid
quickandroid copied to clipboard
Animated menu back button.
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.
Hi @molchanoviv,
It is a bit tricky to do so. It need to set following things:
- iconSource to empty string
- Set keyline1 from 16dp to 72dp.
- 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.