2017-03-18 4 views
2

フォームのタイトルバーを隠す/取り除くにはどうすればよいですか?フォームのタイトルバーを隠す/取り除くにはどうすればよいですか?コードネームワン

Formのカスタムクラスを作成してshouldPaintStatusBar()をオーバーライドしましたが、動作しませんでした。

全体のコードは次のとおり

public class SplashScreenOp { 
    private Resources theme; 
    private Form splashForm; 
    public Form getForm() { 
     return splashForm; 
    } 

    public SplashScreenOp(Resources theme) { 
     super(); 
     this.theme = theme; 
    } 

    public final void show() { 
     splashForm = new Form(new BorderLayout()); 
     Image splashScreenImage = theme.getImage("splashscreen.png"); 
     ScaleImageLabel scaleImageLabel = new ScaleImageLabel(splashScreenImage); 
     splashForm.add(BorderLayout.CENTER, scaleImageLabel); 
     splashForm.show(); 
    } 
} 

このスプラッシュページであるので、画像のみが表示されるように。すなわち、タイトルバーはありません。

答えて

4

Toolbarをグローバルに使用していることを前提としています。あなたは以下のどちらか(あるいは両方)を呼び出すことにより、任意のTitleCommandとを添加しないことにより、タイトルバーを非表示にすることができます:

splashForm.getToolbar().setUIID("Container"); 

splashForm.getToolbar().hideToolbar(); 
+0

おかげで、それが働きました! (私はそれを動作させるために両方とも電話しなければならなかった)。 – ikevin8me

関連する問題