12-10-2008, 08:25 AM
|
#3 (permalink)
|
| Knows Where the Search Button Is
Join Date: Jul 2008 Model: 8300 PIN: N/A Carrier: Airtel
Posts: 15
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Thanks for your reply.
I have gone through the documentation.
Finally I implemented ViewListener.
While I am opening any mail in Messages, then my Implemented class is called and the open(MessageEvent e) is executed.
In this open() method I opened one GUI application. But after closing the GUI application, opened mail is not displayed.
My code:
public class MailOpenListener extends UiApplication implements ViewListener{
public void open(MessageEvent me) {
System.out.println("shan in MailOpenListener open method");
//opening my GUI.
LoginScreen screen = new LoginScreen(); // this screen having one textbox.
UiApplication.getUiApplication().pushScreen(screen );
}
}
My requirement is, when I give some value in the textfield in LoginScreen, then only the mail should be opened. Can u provide me some sample code for this. If commented the " LoginScreen screen = new LoginScreen();" and " UiApplication.getUiApplication().pushScreen(screen );" then the mail is opened.
But I need to put my GUI while opening. I didnt write the LoginScreen code here. it is having only one textbox and one submit button. if the text is "shan" and click the "submit" button then only the mail should be opened..
Thanks,
Shanmukh |
| Offline
| |