Namespaces
Variants
Actions
Revision as of 07:39, 1 August 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Canvas not fading correctly when onscreen keypad is on (Known Issue)

Jump to: navigation, search
Article Metadata

Tested with
Devices(s): Nokia 5800 Xpress Music

Compatibility
Platform(s): S60 5th Edition

Article
Keywords: PopUpTextBox, Nokia-MIDlet-On-Screen-Keypad
Created: User:Technical writer 1 (12 May 2009)
Last edited: hamishwillee (01 Aug 2012)

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.

133 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved