Reputation: 2049
I am writing an app and willing to package it for different BlackBerry devices with different properties/features and resolutions.
My problem is how do I go about creating a DeviceConfigurationManager
that will give me device specific properties/paddings/margins/resolutions etc?
I have read here on SO about using Ui.UNITS_pt
for fonts, having multiple images for different resolution devices and other things that has helped me in designing my DeviceConfigurationManager
.
For example in my buttons I have used margins and so for various devices I kept one device as a reference and relatively returned margins for other devices on width(Display.getWidth()>320
) check. But I have seen I still don't get exact perfection for other devices (Buttons set centered for the base device doesn't also get perfectly centered for other devices).
Please suggest some other or a better way about designing my DeviceConfigurationManager
class. Thanks a lot.
Upvotes: 1
Views: 113
Reputation: 380
Can't offer too much help - but plenty of sympathy. If you're developing for the BlackBerry Java OS you're just going to have to get used to having lots of boiler-plate to handle the different devices. I suspect you do the same as me; have a class that runs on startup, reads the screen size and then sets all kinds of static params for font sizes, padding etc etc.
Upvotes: 2