You Are Here:

Community: Wiki

This page was last modified on 12 June 2009, at 09:40.

KIJ001377 - Canvas not fading correctly when onscreen keypad is on

From Forum Nokia Wiki



ID KIJ001377 Creation date June 12, 2009
Platform S60 5th Edition Devices Nokia 5800 Xpress Music
Category Java ME Subcategory MIDP 2.1


Keywords (APIs, classes, methods, functions): PopUpTextBox, Nokia-MIDlet-On-Screen-Keypad


Description

A Canvas with the onscreen keypad on does not fade to the background when Alert or Pop-up TextBox items appear on the foreground.

How to reproduce

1. Implement a test application using the following code snippet:


Test MIDlet:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
 
public class CanvasFade extends MIDlet implements CommandListener{
 
Display d;
TestCanvas tc;
Alert al;
TextBox tb;
Command c1, c2, c3, c4;
 
public CanvasFade(){
 
d=Display.getDisplay(this);
 
if(tb==null){
c1 = new Command("Set Canvas", Command.SCREEN, 0);
tb = new TextBox("Popup TextBox", null, 100, 0);
tb.addCommand(c1);
tb.setCommandListener(this);
}
if(al==null){
c2 = new Command("Exit alert", Command.SCREEN, 0);
al = new Alert("Alert");
al.setTimeout(Alert.FOREVER);
al.addCommand(c2);
al.setCommandListener(this);
}
 
if(tc==null)
{
tc=new TestCanvas(this);
c3 = new Command("Set TextBox", Command.SCREEN, 0);
c4 = new Command("Set Alert", Command.SCREEN, 0);
tc.addCommand(c3);
tc.addCommand(c4);
tc.setCommandListener(this);
}
}
 
public void startApp() {
 
d.setCurrent(tc);
}
 
public void pauseApp() {
}
 
public void destroyApp(boolean unconditional) {
}
 
public void commandAction(Command cmd, Displayable dp) {
 
if(cmd==c1){
d.setCurrent(tc);
}
 
else if(cmd==c2){
d.setCurrent(tc);
}
 
else if(cmd==c3){
d.setCurrent(tb);
}
 
else if(cmd==c4){
d.setCurrent(al);
}
 
}
}

Test Canvas:

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
 
public class TestCanvas extends Canvas
{
 
CanvasFade midlet;
 
public TestCanvas(CanvasFade midlet)
{
try
{
this.midlet = midlet;
}
catch(Exception e)
{
e.printStackTrace();
}
}
 
public void paint(Graphics g)
{
g.setColor(100, 100, 100);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(0, 0, 0);
g.drawString("This is test canvas", 0, 0, 0);
}
}

For a PopUpTextBox, include the JAD parameter/value pair Nokia-UI-Enhancement: PopUpTextBox in the JAD file.

2. Launch the application. Select Options and set either Alert or Pop-up TextBox on. With the onscreen keypad on, the Canvas in the background is not faded. Exit the application.

3. For comparison, test this issue without the onscreen keypad on. Select Menu > Settings > Application mgr. > Installed apps. > <Test MIDlet>. From the Options menu, select Suite settings. Set On-screen keypad to Off.

4. Repeat step 2. The Canvas will be correctly faded when it is in the background.


Solution

This issue is expected to be fixed in future software versions, starting with S60 5th Edition.

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: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fKIJ001203E5fE2dE5fNewE5flineE5fcannotE5fbeE5finsertedE5fwithE5fE2527E255CnE2527E5fcharE5finE5fAlertE5fusingE5fJavaE5fME45E5finE5fS60X 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