11-29-2012 08:41 PM - edited 11-29-2012 08:46 PM
so i have added a button to the Toast message. Normally without the button it automatically disappears after 10 seconds but with a button it takes 1:30min before it goes away.
from the doc below.
"The toast will be dismissed after a predefined timeout period lapses. If the toast includes a button, then the timeout period is activated with the first user interaction, e.g., user touching the screen. During this time, if a button is displayed, the user can select it."
anyone have this problem?
Update: After the toast msg is display and if I touch the screen then it will activate the timeout and then it disappears but if I let it sit there it will not go away until a very long long time.
Solved! Go to Solution.
11-29-2012 08:42 PM
11-29-2012 08:50 PM
I haven't tried, but are you saying it will stay there for 90 seconds even if you are interacting with the screen?
No. If you touch the button then it goes away but it you do not touch the screen then it just sits there.
See my updated finding above.
What I really wanted is to display a toast message saying "Picture Saved. | View" View is the button. So when the user selects the View button it will view the picture and it will time out the close if the user does nothing but the problem is it will not close like 90 seconds.
11-29-2012 10:04 PM
11-29-2012 11:05 PM
Maybe I miss understood the usage. I would expect to behave the same with or without the button. In the screen shot it has the Undo button in their example. It doesn't make any sense to force the user to select button. What if the user doesn't want to undo as an example and just want to dismiss the msg?
Like what I want to do is allow the user the option to view otherwise just timeout and goes away.
In anycase I guess I won't be adding the button. thanks peter.
11-30-2012 11:10 AM
11-30-2012 11:58 AM - edited 11-30-2012 12:31 PM
I figured out the button in QML. IIRC it is something like this:
body: "body text here"
You can use a timer to dismiss the toast automatically after X seconds
11-30-2012 03:15 PM