Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Canvas size?

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class Canvas has a method called getWidth and getHeight, do the width and height i get from these methods include the menu bar (usually 'back' on the left, 'next' on the right)? Or just the space above the menu bar?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the MIDP 2.0 specification,
getHeight() of Canvas gets the height in pixels of the displayable area of the Canvas. and getWidth of Canvas gets the width in pixels of the displayable area of the Canvas. If the menu bar is from the device-specifc space, it won't be included in those getHeight() and getWidth()...

But if those buttons are created by your application, they are included...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic