2012-02-08 6 views

答えて

1
final Bitmap header_Bitmap = //your image 
    VerticalFieldManager vfm_ = new VerticalFieldManager(
      Manager.NO_HORIZONTAL_SCROLL | Manager.NO_HORIZONTAL_SCROLLBAR 
        | Manager.NO_VERTICAL_SCROLL 
        | Manager.NO_VERTICAL_SCROLLBAR | Field.USE_ALL_WIDTH) { 
     public void paint(Graphics graphics) { 
      graphics.setBackgroundColor(0x040811); 
      graphics.clear(); 
      graphics.drawBitmap(0, 0, header_Bitmap.getWidth(), 
        header_Bitmap.getHeight(), header_Bitmap, 0, 0); 
      super.paint(graphics); 
     } 
    }; 
add(vfm_); 
0

背景BackgroundFactoryは任意VerticalFieldManagerHorizo​​ntalFieldManager又はMainScreenの背景を設定するために使用することができます。このサポートは、JDEバージョン4.6.0以降で使用できます。

APIを確認してください。

Bitmap bitmap = Bitmap.getBitmapResource("myBitmap.png"); 
Background background = BackgroundFactory.createBitmapBackground(bitmap); 
setBackground(background); 
関連する問題