开发者

how to display a quick message in Blackberry like Android's Toast?

I want to draw som开发者_StackOverflow中文版e message box on screen that will can not get focus and be unobtrusive.

Just like Android's Toast.

Is there a way to do that?


If you'd like to display a rounded rectangle with text which disappears by itself like in this Android screenshot:

how to display a quick message in Blackberry like Android's Toast?

then just call Status.show() on Blackberry:

how to display a quick message in Blackberry like Android's Toast?


I think what you are looking for is

void net.rim.device.api.ui.component.Status.show(String message)

Shows a status screen for two seconds. Invoke this method to show a status screen to the user for two seconds. This method blocks until the user dismisses this screen, or until the two seconds pass. This method shows a screen using the predefined icon Bitmap.INFORMATION.


Looks like there is no such similar BB API as Android's Toast.

However just an idea - you could try to put a LabelField into MainScreen.setStatus(Field status) and remove it after some delay.

See what Alexander Farber and endevour answered.


The EyelidFieldManager allows you to implement something similar to a toast.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜