Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
srivas_nishant
Posts: 12
Registered: ‎12-17-2009
My Device: Not Specified

Blackberry themes in rimlets

Hi can i use my blackberry themes for my rimlet screens? I mean can i access those themes from java code and can i use them inside my application.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Blackberry themes in rimlets

No, every OS version, even 5.0, doesn't support programatically setting/getting themes, there information, etc. From what I remember reading RIM is working on it but it hasn't been released yet.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
New Developer
srivas_nishant
Posts: 12
Registered: ‎12-17-2009
My Device: Not Specified

Re: Blackberry themes in rimlets

Suppose i want to set some themes for my application screen (something like different background images for different days of the week). Whats the best way to do it.

 

Can i use SVG files(used in themes)  in our java app?

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Blackberry themes in rimlets

You can use SVG in Java but you can't access it from themes, at least that is from what I learned from people trying to access files from other COD files (they get exceptions and it never actually works).

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
New Developer
srivas_nishant
Posts: 12
Registered: ‎12-17-2009
My Device: Not Specified

Re: Blackberry themes in rimlets

[ Edited ]

Hi thanks for your reply.

 

My point is i want to put themes to a screen(ui) on my rimlet app what should i do for it. can u throw some light on it?

 

can i set svg file as background for my screen. i don't want to access other themes in blackberry phone. its an svg file that i have written myself and is inside my cod.

 

if not then can u please suggest someways to go about it.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Blackberry themes in rimlets

You can display an SVG in a RIMLet (take a look at the svg folder in the samples folder [RIMLet == CLDC]) as long as the SVG is in the application's COD, it can't be in any other COD unless you added a function to retrieve the file in the second COD itself.

 

I still don't reay understand what you mean by "I want to put themes to a screen(ui)". Do you want to be ble to choose themes from your app, or just to use the theme for your app?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
New Developer
srivas_nishant
Posts: 12
Registered: ‎12-17-2009
My Device: Not Specified

Re: Blackberry themes in rimlets

[ Edited ]

Hi,

 

Ya little sorry to confuse you.

 

I want to use svg files as themes of my application. I don't want other application to access my svg files.

Can u please tell me know how to go about it . Will i get the same look and feel in my app as other standard blackberry themes? Can u give me some link or code sample how to use svg file in a java class.

 

nishant

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Blackberry themes in rimlets

It's ok,

 

I have not done this so I am just going to say how I think it should be done but don't really have any source code to use as examples, if you have specific questions (like how do I use SVG, how do I make a custom Field) you should use the search bar, if that doesn't help then create a new post.

 

In order to use an SVG file as a theme you need to make your own custom Fields. Override the paint function would probably be fine. Use a class (like the class that has the main function) to load and store the SVG file so you don't need to load it every time you use it, then access it from your Fields.

 

No own else will be able to access the SVG file.

 

If you override the paint method, yes you will have the same look across different BlackBerrys.

 

As stated before, look in the "samples" folder for another folder called "svg" which has a bunch of examples. The "samples" folder is located:

JDE: look in the JDE's install directory.

eJDE (Eclipse plugin): Go to where Eclipse is installed, open up "plugins", open up the folder that starts with "net.rim" and ends with whatever OS version you are developing for, then look in "components"

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.