I am trying to add a progress indicator (clock style or hour glass, depending on the user's BB theme) to an element on the main screen of my application.
In short, my application has a field at the bottom of the screen that will display a rotating list of items parsed from an XML file.
I have moved the downloading and parsing operation to the background so the application remains responsive while the XML data is being retrieved. Now I would like to add an above mentioned progress indicator.
So far, I have only found pages that describe a progress bar, which is not what I want, or displaying wait screens that would lock the application during the parsing process.
If someone could point me in the right direction, thanks.
If you are working in OS 6 this might be of use:
http://docs.blackberry.com/en/developers/deliverables/18125/Progress_indicator_1214566_11.jsp
This is a solution I implemented in my own project:
http://supportforums.blackberry.com/t5/Java-Development/Progress-Bar/m-p/588505#M121376
I would suggest (from experience) to stick to the BB forums for BB questions, Stack Overflow is not a very good place to search from BB knowledge considering it isn't THAT widespread and popular.
Try this link
http://www.naviina.eu/wp/blackberry/loading-class-for-blackberry/
and also use
synchronized (UiApplication.getEventLock()) {
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
setShowLoader(false);
}
});
Related
I am currently trying trying to implement an Action Extension that transforms content on a Safari web page through Google's Translation API.
My issue is that I would like to display some UI on the screen without covering the whole screen, but no matter what I do that doesn't seem to work.
I have tried the following:
Setting this in the info.plist
<key>NSExtensionActionWantsFullScreenPresentation</key>
<false/>
Trying to change the content size in the interface builder to the following
https://imgur.com/a/gfYvFiD (Uploading images through stack isn't working for some reason)
Giving the UI a clear background color (always ends up being grey after the presentation is complete)
Setting the presentation style to be over current context.
Now i have seen a similar question where the accepted response was that it cannot be done due to Apple restrictions (https://stackoverflow.com/a/38764183/10058854), but I have seen some apps that seem to do it.
For example, iTranslate:
https://imgur.com/a/QpFo5St
The above 2 images clearly show that they have created an Action Extension and that the added UI is just the bar at the bottom of the web view.
Any help would be much appreciated, and thank you for reading this.
How do I create a tab bar like WhatsApp on BlackBerry in my BlackBerry app? I want that feature in BlackBerry OS 7.0. I have used managers -- HorizontalFieldManager and VerticalFieldManager -- to achieve it. But it doesn't look as attractive as WhatsApp. Can FieldTabController help me do this?
It's not going to look attractive if you are just making tweaks to the code, and then seeing what that looks like. You need to start with a design you find attractive. Once you have that goal put together as an image, you start writing code to make the UI look like the design image.
The WhatsApp tab bar is not a straightforward combination of built-in UI managers from RIM. It has a fair amount of customization - each tab has three visual states, and there is a tooltip that follows the focus, as well as a context tab on the right that changes depending on the currently selected main tab. This means there are several interacting UI components here, not just a single magic manager.
Essentially, you will probably want to start building your own custom Field objects.
Basically, subclass the Field class (or one of the other subclasses), and learn to love the paint(..) method and the Graphics API.
In my application I have a requirement to navigate from one screen to another without popping up the active screen so that if a user clicks the back button while navigating he should be able to view the previous screens where he came from. I implemented this by pushing screens one by one in the UI stack but while doing so I saw that there is a considerable consumption of the memory. Can anyone tell me how can I minimize the memory used. In my app I saw that the memory is not released that much.
you can achieve it by this way .... it will work as you want.
ButtonField yourButton = new ButtonField("your Buton"){
protected boolean navigationClick(int status, int time) {
UiApplication.getUiApplication().
popScreen(UiApplication.getUiApplication().getActiveScreen());
return true;
}
};
The memory issue was not due to pushing so much screens to the display stack. I had some serious issues in my code due to which the resources were not releasing ending up in OutOfMemory exception.
I had corrected them and due to that my application is working well now. As far as I know now, there should not be any issues in pushing so many screens. It should work well.
We're developing some application and want to display some information on the device homescreen like Weather Plus application does.
Could you tell me how i can do the same thing? Thank you!
From what I've seen in the Weather Plus video demos, the app doesn't (or can't) paint on the current background image, but you can choose an image to be the homescreen background with all the weather info painted on it. It also doesn't need a custom theme, so I'm pretty sure they just use the HomeScreen.setBackgroundImage() method.
As far as the image generating is concerned, my best bet would be opening the background image picked by the user in a Bitmap object, passing it to a new Graphics object to do all the necessary rendering and creating a new .png file using the encode(Bitmap bitmap) method of PNGEncodedImage.
If you wanted the homescreen image to be for example animated you might want to try the Blackberry Theme Studio, but I don't think it offers the amount of interactivity (retrieving data, loading images) you are looking for, at least for now.
Hi I am new to Blackberry.I have a Bitmap which is used as a homescreen and it contains four stages.I want to make these stages as Buttons.I am developing the application in storm version.How can I implement these parts of the screen as Button events?Any answers appreciate.
Take a look at the BitmapButton example
Implement advanced buttons, fields, and managers
Started 04-21-2010
Modified 05-10-2010
link