The BitmapField class that is part of the BlackBerry smartphone API set allows an application to display an image within an application. These fields do not support internal scrolling, therefore if the image you wish to display is larger than the available screen area the image will be truncated. The following example demonstrates how to create a custom field that supports internal scrolling (scrolling within the field) if the image is larger than the available screen area available to the field.
You can download source for the ScrollableImageField.java
I have downloaded this code and it is not working.
ReplyDeleteWhen I scroll the image, it got uncaught exception.
Please advise me asap.
Thanks.
This code works if the image is bigger than the screen size. If any dimension - width or height - is smaller than the screen size, an invalid argument exception is thrown. Working through to find a solution; if this is presented as a complete example of how to do this, it is not ready for prime time and needs some work.
ReplyDelete