0

I am developing the video player on the canvas in J2ME . and i want to show the video in the landscape mode if the height is greater then the width of the phone otherwise to show the video in the portrait mode. how can i do this ?
Thanks

neeraj
  • 740
  • 1
  • 6
  • 21

1 Answers1

1

Unfortunately you can't dynamically force this in J2ME.

Some phones contain a jad attribute to force orientation but I'm unaware of those that allow dynamically forcing an orientation.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • The size change method is working abrubtly in LWUIT as it is giving me correct height sometimes only. I wanted to draw a slider component in a video player of a form but the problem that i am facing is i need to restrict the height of video player so that component can be drawn. Can we draw anything on video player, if not how can we redraw the component on orientation change(Both video player and slider component)? – neeraj Feb 05 '13 at 11:50
  • Redraw should happen automatically, not sure what you have there. Drawing on the video isn't supported by LWUIT but I think the advanced multimedia supplement JSR has an ability to draw an image on the video (MIDP image not LWUIT image) this is pretty difficult to work with since mutable images aren't translucent thus won't work so its pretty advanced stuff, didn't try it myself so I can't help there anyway. – Shai Almog Feb 05 '13 at 21:22
  • Hi Shai , I am using refreshTheme() function in lwuit for update the form on mobile screen after adding or removing component from the form, But sometime it gives an error as "Array index out of bounds 2>=2", What can be solution for that? – neeraj Mar 25 '13 at 06:59
  • 1
    Check that you aren't violating the EDT somewhere. – Shai Almog Mar 25 '13 at 12:17
  • I need to add a container from a child thread, and then i am calling the refreshTheme() function . Then it gives me error . Is it violating the EDT ? – neeraj Mar 25 '13 at 12:33
  • Yes. You need to use call serially. – Shai Almog Mar 26 '13 at 12:58