You Are Here:

Community: Wiki

This page was last modified on 12 June 2009, at 08:38.

KIJ001373 - Status pane area not drawn correctly in full-screen MIDlets with multiple LCDUI objects

From Forum Nokia Wiki



ID KIJ001373 Creation date June 12, 2009
Platform S60 5th Edition Devices Nokia 5800 XpressMusic
Category Java ME Subcategory UI


Keywords (APIs, classes, methods, functions): Canvas.repaint(), Display.setCurrent(Displayable)


Description

The status pane area is not updated correctly when full-screen Canvas is in the background with two or more pop-up-type components on top of it and another Displayable object is set as current.

How to reproduce

1. Implement a test MIDlet using the following example. Include the related JAD attribute/value pair in the JAD file: Nokia-UI-Enhancement: PopUpTextBox in the TextBox object to make it a Pop-Up TextBox.

Code for main MIDlet:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
 
public class CanvasUpdate extends MIDlet implements CommandListener{
 
Display d;
Form f;
Alert a;
TestCanvas tc;
TextField tf;
Command canvasCmd;
Command alertCmd;
Command formCmd;
Command textBoxCmd;
TextBox tb;
 
 
public CanvasUpdate(){
 
d=Display.getDisplay(this);
f=new Form("Test Form");
a=new Alert("Test Alert");
tb=new TextBox("Test TextBox", "", 25, TextField.ANY);
canvasCmd=new Command("Canvas",Command.SCREEN,1);
alertCmd=new Command("Alert",Command.SCREEN,1);
formCmd=new Command("Form",Command.SCREEN,1);
textBoxCmd=new Command("TextBox",Command.SCREEN,1);
f.addCommand(alertCmd);
f.addCommand(canvasCmd);
f.addCommand(textBoxCmd);
f.setCommandListener(this);
a.addCommand(canvasCmd);
a.addCommand(formCmd);
a.addCommand(textBoxCmd);
a.setCommandListener(this);
tb.addCommand(alertCmd);
tb.addCommand(canvasCmd);
tb.addCommand(formCmd);
tb.setCommandListener(this);
tc=new TestCanvas(this);
}
 
public void startApp() {
 
d.setCurrent(tc);
}
 
public void pauseApp() {
}
 
public void destroyApp(boolean unconditional) {
 
}
 
public void commandAction(Command cmd, Displayable dp) {
 
if(cmd==canvasCmd){
 
d.setCurrent(tc);
}
 
if(cmd==alertCmd){
 
d.setCurrent(a);
}
 
if(cmd==formCmd){
 
d.setCurrent(f);
}
if(cmd==textBoxCmd){
 
d.setCurrent(tb);
}
}
}


Code for TestCanvas:

import javax.microedition.lcdui.Canvas;
 
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
 
public class TestCanvas extends Canvas implements CommandListener{
 
CanvasUpdate cu;
Command cmdAlert;
Command cmdForm;
Command cmdPopUpTextBox;
 
public TestCanvas(CanvasUpdate cu) {
 
this.cu=cu;
cmdAlert = new Command ("Alert", Command.SCREEN, 0);
cmdForm = new Command ("Form", Command.SCREEN, 0);
cmdPopUpTextBox = new Command("TextBox",Command.SCREEN,0);
 
this.addCommand(cmdAlert);
this.addCommand(cmdForm);
this.addCommand(cmdPopUpTextBox);
this.setCommandListener(this);
this.setFullScreenMode(true);
}
 
protected void paint(Graphics g) {
 
g.setColor(16000);
g.fillRect(0, 0, getWidth(), getHeight());
 
}
 
public void commandAction(Command c, Displayable d) {
 
if(c==cmdForm){
 
cu.d.setCurrent(cu.f);
}
 
if(c==cmdAlert){
 
cu.d.setCurrent(cu.a);
 
}
 
if(c==cmdPopUpTextBox){
 
cu.d.setCurrent(cu.tb);
 
}
}
}


2. After launching the MIDlet with the Canvas on the screen, press the LSK or the RSK to view the list including Alert, Form, and TextBox.

3. Set an Alert on the screen.

4. Set a Pop-Up TextBox on the screen.

5. Set a Form on the screen. For the affected devices, a rectangle area of Canvas appears on top of the screen in the status pane area instead of the entire Form covering the screen area.


Solution

This issue is expected to be fixed in future S60 5th Edition devices.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fKIJ000723E5fE2dE5fkeyPressedE28E29E5fcalledE5ftwiceE5fwhenE5fE4cSKE5fisE5fpressedE5fandE5fE44isplayE5fisE5finE5fE28CanvasE29E5ffullE2dscreenE5fmodeX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZKnowledgeBaseContentQ qdcZtypeQUqfntypeZKnownIssueQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZKnowledgeBaseContentQ qfnZtypeQUqfntypeZKnownIssueQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZKnowledgeBaseContentQ qrdfZtypeQUqfntypeZKnownIssueQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ