Quote:
Originally Posted by Meenal I want to streach the img on the entire screen.But the image does not occupy the whole screen.Can somebody tell me where i am going wrong.
Check the following code snippet: Code: _bitmap = Bitmap.getBitmapResource(icon.PNG);
_bmp = new BitmapField(_bitmap, BitmapField.USE_ALL_HEIGHT | BitmapField.USE_ALL_WIDTH) {
public void paint(Graphics g) {
g.drawBitmap(0, 0, g.getScreenWidth(), g.getScreenHeight(), _bitmap, 0, 0);
}
};
add(bmp ) |
If u want to add image then first take any manager like,
VerticalFieldManager vfm=new VerticalFieldManager(Manager.USE_ALL_HEIGHT);
then,add your bitmapfield on to the manager,
vfm.add(bmp);
and after that add this manager on to the screen...
this.add(vfm);
Definately it solves your problem....
Thanks,
-Hitesh