BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-14-2007, 05:31 AM   #1
krishnanrajah
Knows Where the Search Button Is
 
Join Date: Aug 2007
Model: 7100T
PIN: N/A
Carrier: verizon
Posts: 20
Default Custom PopUp Screen

Please Login to Remove!

Hi,

How can a popupscreen be customized ? I need to add images to the border and dropshadows to the window. Also is it possible to keep the application running in background and pop-up when a PIN message is recieved.

thanks
krishnan
Offline  
Old 09-15-2007, 10:58 PM   #2
arifzaman
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Default

Hi krishnan,

Quote:
Originally Posted by krishnanrajah View Post
How can a popupscreen be customized ? I need to add images to the border and dropshadows to the window. Also is it possible to keep the application running in background and pop-up when a PIN message is recieved.
You can create a custom Dialog by extending the net.rim.device.api.ui.component.Dialog class and customizing it to suit your needs.

See the following link to create a background application:
http://www.blackberryforums.com/deve...to-starts.html

Sample code to show message from a Background application:
Code:
private void showMessage(String data) {
  UiEngine ui = Ui.getUiEngine();
  Screen screen = new Dialog(Dialog.D_OK, data, Dialog.OK,
    Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),
    Manager.VERTICAL_SCROLL);
  ui.queueStatus(screen, 1, true);
}
Enjoy,
ARIF
Offline  
Old 09-15-2007, 11:12 PM   #3
krishnanrajah
Knows Where the Search Button Is
 
Join Date: Aug 2007
Model: 7100T
PIN: N/A
Carrier: verizon
Posts: 20
Default

Hi Arif,

Thanks for the response.

Quote:
Originally Posted by arifzaman View Post
You can create a custom Dialog by extending the net.rim.device.api.ui.component.Dialog class and customizing it to suit your needs.
Is there a code sample available for Extending Dialog ? As far i have seen it allows the cutomization of the icon , the messages only. I need to design a totaly different looking alert screen, its like lets say a designing a popup screen with star-wars images for the background.

thanks
krishnan
Offline  
Old 09-17-2007, 07:21 PM   #4
vikas1985
New Member
 
Join Date: Sep 2007
Model: 7290
PIN: N/A
Carrier: Mail
Posts: 3
Default Customizing the dialog box in net.rim.device.api.ui.component.Dialog;

Hi Arif,

Me too looking for code to change the background color of dialog box provided by net.rim.device.api.ui.component.Dialog api.

Small code snippet for how to do it will be very helpful.

Regards,
Vikas
Offline  
Old 09-17-2007, 11:16 PM   #5
arifzaman
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Default

Hi Vikas,

Quote:
Originally Posted by vikas1985 View Post
Hi Arif,

Me too looking for code to change the background color of dialog box provided by net.rim.device.api.ui.component.Dialog api.

Small code snippet for how to do it will be very helpful.

Regards,
Vikas
Here is a sample code to change the background color of Dialog:
Code:
/**
 * Custom Dialog
 */
public final class CustomDialog extends Dialog {   
    
    public CustomDialog() {
        super(Dialog.D_OK, "Custom Dialog", 1,
        Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.FOCUSABLE);        
    }
    
    public void paint(Graphics graphics) {        
        graphics.setBackgroundColor(Color.RED);
        graphics.clear();
        super.paint(graphics);
    }   
}

/**
 * Add the following code, where you do like to show your custom dialog
 */
CustomDialog customDialog = new CustomDialog();
customDialog.show();
Cheers,
ARIF
Offline  
Old 09-18-2007, 03:31 PM   #6
vikas1985
New Member
 
Join Date: Sep 2007
Model: 7290
PIN: N/A
Carrier: Mail
Posts: 3
Default Changing background color of Dialog

Hi Areef,

Many thanks for your code.

But don't know its some how still not changing the color. I am running your code on Blackberry simulator 7290.

I am attaching the screen shot. In which on a button's click event I have called the custom dialog box.

Any more methods to do it?

Thanks & Regards,
Vikas
Attached Images
File Type: jpg CustomDialog.JPG (46.8 KB, 32 views)
Offline  
Old 11-22-2007, 08:19 PM   #7
Asskick
Thumbs Must Hurt
 
Join Date: May 2007
Model: 9000
PIN: N/A
Carrier: Telcel
Posts: 58
Default

Nice code! works like a charm.. but now I have a lil' variation i would like to get workign which I couldnt get... how can I make it show the dialog when an app is working on the background?? Let says it fires up something from an event that happens, and it pops up just a dialog to input something (dont want to load the full control of the app)
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


PANASONIC KX-NT553 Business IP Handset VoIP Office Phone picture

PANASONIC KX-NT553 Business IP Handset VoIP Office Phone

$49.99



Polycom Vvx 601 VoIP 16 Line Business Phone 4.3

Polycom Vvx 601 VoIP 16 Line Business Phone 4.3" HD Touchscreen PoE With Stand

$28.95



Mitel Aastra 6869i SIP VoIP  12 Line Office Desk Phone with Handset picture

Mitel Aastra 6869i SIP VoIP 12 Line Office Desk Phone with Handset

$49.99



Yealink SIP-T21P E2 IP Phone with Stand PoE Warranty VoIP Tested picture

Yealink SIP-T21P E2 IP Phone with Stand PoE Warranty VoIP Tested

$23.98



AVAYA 9620L VoiP IP Display Network Phone #700461197 NEW OPEN BOX L@@K picture

AVAYA 9620L VoiP IP Display Network Phone #700461197 NEW OPEN BOX L@@K

$49.99



Allworx Verge 9312 Voip IP Color Display Phone 8113120 Gigabit NO Stand (no PSU) picture

Allworx Verge 9312 Voip IP Color Display Phone 8113120 Gigabit NO Stand (no PSU)

$79.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.