Make a BitmapField go full screen when clicked

143 Views Asked by At

I am writing an app that does live streaming. Can I make a bitmap field go full screen when clicked?

1

There are 1 best solutions below

2
On

The easiest way to do it (that I could think of in 2 minutes):

  • Make your bitmap clickable (described here)
  • When the bitmap field is clicked, scale it into a new bitmap the size of the whole screen:

Bitmap scaled = new Bitmap(Display.getWidth(), Display.getHeight()); originalBitmap.scaleInto(scaled);

  • Create a new Screen, containing only a BitmapField (with your scaled bitmap)
  • Push the new Screen.