Wednesday, July 14, 2010

small issues great impact---My basic learnings Blackberry

In developing a blackberry app we frequently go trough Paint,PreferredWidth (),etc...

#1)In a Manager or a Field there will be a default Height and width.This is obtained by using getPreferredWidth().If the height or width exceeds the preferred width then the width and height is obtained by using getHeight() and getWidth().So,if you want to use the width of a Field then it is better to go for

Math.max(field.getPreferredWidth(),field.getWidth());


#2)In paint method,
If you want to draw a background type of thing,do required coding before Super.Paint(graphics),else if you want to draw a text type of thing do required type coding after Super.Paint(graphics).Super.Paint(graphics) will do the required painting defined in code(ex. for a horizontalFieldManager it will add the fields which are written in respective code.).

#3[14/07/10])If you are a Blackberry developer running and debugging costs you a lot.Better go for 8320 simulator running.it will take very less time when compared to other simulators.9700 takes a lot of time to load but the advantage is load once use number of times.unlike other simulators 9700 doesn't ask for restart if you delete the app(unless if there is an exception that too in some exceptions only).9700 is based on 5.0 JDE.when coming to 9000 simulator it allows deletion for one time.After second time deletion of same cod file it asks for restart.


No comments:

Post a Comment