Issue
In my Xamarin app, there is a button, which I want to make visible after 5 seconds.
I tried Device.StartTimer
, but it make button appears after 5 seconds, and then after 5 seconds later hide it and then after 5 seconds make it appears again (forever).
Device.StartTimer(TimeSpan.FromSeconds(5), () =>
{
// Button
return true;
});
How can I make button appears after 5 seconds, and it never disappears?
Solution
I think what you need is to return false so the Timer only runs once.
I.e.:
Device.StartTimer(TimeSpan.FromSeconds(5), () =>
{
/* Make your button appears here */
// ...
return false;
});
Answered By - Vitor P. Carneiro
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.