开发者

How to set background of the default datetimepicker blackberry

T开发者_运维技巧he default background color of DateTimePicker provided by blackberry is Black. I want to change this background color to the theme of my app, which is Light blue.

How can i achieve this? I am developing for OS 5.0 and above. Please help.


As far as I know about this, you can't change the background of a datetimepicker. You cannot make a class that extends DateTimePicker and override its classes because it is an abstract class. So I guess u'll have to accept the background offered by RIM for this component.

If you check the API: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/picker/DateTimePicker.html you will see clearly that there is no Paint method or paintBackground method to override.

So for me there is no way to do that. You can use a work around method that will consist of creating a popup screen representing the object in question. Check the following two links for more help:

http://supportforums.blackberry.com/t5/Java-Development/overlapping-field-issue-on-9500/td-p/419200

Or

BlackBerry - Creating custom Date Field


There is no way that you can change the default view, if you want to change that then u have to make some stub classes where you wil manually describe the classes and the functions, for the date event and import that. like importing a jar file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜