In android, there is a function call Toast and it show instantly without involve in time. I tried to use Status in RIM but it must run in the invokeLater and cannot set the time less than 1 second. So it cannot display instantly.
Any other built in that same with Toast or Status?
No there is not afaik.
Toastwas “invented” in a way by Android.Previous OS’s have used popup boxes with confirmation buttons. A
Toastis almost like a popup box with a timer attached to it.Of course, @Signare gives the common replacement correctly for what you would “normally” do on BlackBerry.
Dialog.alert(String)If you want something more “Androidy”, this is something we want to implement at Cobi, but have not gotten around to yet due to time constraints working on client work.
There are 2 unique aspects to a
Toastcompared to the “old” way of doing things:To create the popup screen, look at the
PopupScreenclass – and you pass in a layout manager of your own that will be displayed.You could start a timer when the screen is shown (we have not implemented this yet) and that could close the screen for you.
As far as not blocking the user – this is the major difference – and I do not know if it can be done if you use the
PopupScreenclass. Perhaps if yourPopupScreenpasses all keypresses through to the underlying screen, this may be possible.In some of our apps, we have a custom field, defined in our base
MainScreensubclass, that can be positioned over the rest of the fields on the screen. This allows the user to continue interacting with the screen while the field is displayed. I cannot share that code at the moment here.