listing9-05_mymidlet.java_showinglogmanually
来自「着几乎所有智能机厂商都将有自己配套的App Store,甚至并非智能手机制造商的」· JAVA_SHOWINGLOGMANUALLY 代码 · 共 48 行
JAVA_SHOWINGLOGMANUALLY
48 行
// you can show the log manually by invoking Debug.showLog():
import de.enough.polish.util.Debug;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class MyMIDlet extends MIDlet
implements CommandListener
{
//#ifdef polish.debugEnabled
private Command logCmd = new Command( "Show log",
Command.SCREEN, 10 );
//#endif
private Screen mainScreen;
private Display display;
public MyMIDlet() {
this.mainScreen = new List( "Hello World", List.IMPLICIT );
this.mainScreen.setCommandListener( this );
//#ifdef polish.debugEnabled
this.mainScreen.addCommand( this.logCmd );
//#endif
}
public void startApp() {
this.display = Display.getDisplay( this );
this.display.setCurrent( this.mainScreen );
}
public void destroyApp( boolean unconditional ) {
}
notifyDestroyed();
}
public void pauseApp() {
}
public void commandAction(Command cmd, Displayable screen ) {
//#ifdef polish.debugEnabled
if (cmd == logCmd) {
Debug.showLog( this.display );
return;
}
//#endif
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?