I want to change the title of blackberry application view again and again when certain condition gets true, how can I do it?
Right now I am doing as
BitmapField loading=new BitmapField(Bitmap.getBitmapResource("loading.png"));
this.setTitle(loading);
but now I want something else on title, how can i do it?
In MainScreen.setTitle you can use any Field - LabelField or BitmapField or even CheckboxField :) actually, anything.
But remember to handle UI thread when updating UI from other threads.
Related
Title pretty much sums it up, I know I can bring it up with Open(), but I'd like something like .Close() to manually close it myself in certain circumstances.
According to the Unity docs of TouchScreenKeyboard you just need to have a reference to the previously opened keyboard (return value of Open) and then TouchScreenKeyboard.active = false;
You can set they keyboard isntance to null.
For instance, if you had
keyboard = TouchScreenKeyboard.Open(...
then you can close it by doing
keyboard = null;
I need a black temporary transparent box that must show something like "Loading...." with a spinner it. We can see such a view in twitter when "Tweeting" an update - it says "Sending tweet..." kinda thing.
Is this an inbuilt behavior in UIKit. How do I get this box to show up on screen for a few seconds and disappear.
please help.
You need to use DSActivityView. All this is handled there. Instead of doing your own thing I suggest you use this.
For what you need this is how you need to go -
#import "DSActivityView.h"
[DSActivityView activityViewForView:self.view withLabel:#"Tweeting"]; //to show spinner with label
[DSActivityView removeView]; //once its done
You can also try using MBProgressHud
how can i call the popupScreen on top of my main screen. it functions as a user login
I'm not sure what version of the SDK you are using but I've used the following:
DialogFieldManager manager = new DialogFieldManager();
PopupScreen popup = new PopupScreen(manager);
UiApplication.getUiApplication().pushScreen(popup);
popup.doPaint();
The following link will help you to find solution for push the popup screen on the top of the main screen
Dialog box background color on Blackberry
I want to add a field to the Phone Screen when a screen is received. I successfully made this using the following code:
public void callIncoming(int callId) {
PhoneScreen ps = new PhoneScreen(Call, UiApplication.getApplication());
PhoneScreenHorizontalManager manager = new PhoneScreenHorizontalManager();
LabelField label = new LabelField("Call Received");
manager.add(label);
ps.add(manager);
ps.setScreenBackground(Color.RED);
ps.sendDataToScreen();
}
I tried this code on the following devices:
BB Mini Curve, Bold 4, Bold 2 and Curve and this works like a charm with all the functionality I want. A background colored red is appearing in the area where I can draw fields
I tried it on these phones and the label field did not appear: Torch, Bold3
On these phones, When I add data to the screen, I guess that these fields are appearing below the ringer off notification. With these devices, no Background is appearing... So this is a main issue.
How to solve this and make the fields appear on these phones too?
Thanks in advance
I don't have the answer, but have started a thread here:
http://supportforums.blackberry.com/t5/Java-Development/PhoneScreenDemo-not-displaying-information-on-os6/m-p/1450769#M184811
I've opened a RIM ticket and will share info as I get it.
As far as I can see PhoneScreen has big issues and is not consistently supported across devices.
Using isSupported() will only determine if the device screen type supports the API, (SVG is required according to RIM Jira ticket), not if it will actually work.
I am very new developer for black berry environment. Is there a focus and lost-focus event for the controls which are currently selected or deselected?
Please give me some like or example.
Thank you.
If you are writing your own custom field, or want to catch the events of your Screen class(es), then you would override the virtual Field.onFocus() and Field.onUnfocus() methods.
If you want to catch focus events of other fields, then you have to implement the FocusChangeListener interface and then call the Field.setFocusChangeListener() method of those fields.
Yes, these are Field.onFocus(int direction) and Field.onUnfocus(). Check the API for details.