Bitmap field

Use a bitmap field to display bitmap images that a BlackBerry® device user can view.

Class BitmapField
Supported since BlackBerry® Java® SDK 3.7
Example

For more information about bitmap fields, see the Multimedia Development Guide.

Code sample: Creating a bitmap field

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.BitmapField;
import net.rim.device.api.ui.container.MainScreen;

public class BitmapFieldDemo extends UiApplication 
{
    public static void main(String[] args)
    {
        BitmapFieldDemo theApp = new BitmapFieldDemo(); 
        theApp.enterEventDispatcher(); 
    }
    
    public BitmapFieldDemo() 
    { 
        pushScreen(new BitmapFieldDemoScreen()); 
    } 
}

class BitmapFieldDemoScreen extends MainScreen
{

    public BitmapFieldDemoScreen ()
    {
        setTitle("Bitmap Field Demo");
        Bitmap bitmapImage = Bitmap.getBitmapResource("BlackBerry_Data_Stream.jpg");
        BitmapField fieldDemo = new BitmapField(bitmapImage);             
        add(fieldDemo);
    }
}
Previous topic: Picture fields

Was this information helpful? Send us your comments.