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.
Asked
Active
Viewed 110 times
1

Atif Imran
- 1,899
- 2
- 18
- 33
-
I would check out [Don's answer to this question](http://stackoverflow.com/a/11551148/119114). It discusses how to organize, and dynamically load, image resources that are sized for different BlackBerry screen sizes. Similar to what's built in to Android, with drawable-hdpi, drawable-mdpi, drawable-ldpi, etc. – Nate Nov 15 '12 at 05:08
1 Answers
2
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.

Jonathan Fisher
- 380
- 1
- 5