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
Posts: 7
Registered: ‎07-16-2008
My Device: Not Specified

shadow on popup

i have a popup , but it shows with a white border, the image has the border in transparent. i dont know how to erase that white border.

 

 

popup 

 

 

public PopupGlobalScreen(int type, String text){ super( new VerticalFieldManager( USE_ALL_WIDTH | USE_ALL_HEIGHT | FIELD_HCENTER | NO_VERTICAL_SCROLL | Field.FOCUSABLE){ protected void paintBackground(Graphics g){ try{ g.drawBitmap(0, 0, g.getScreenWidth(), g.getScreenHeight(),popup, 0, 0); }catch (Exception e) { System.out.println(e.toString()); e.printStackTrace(); } } }); //create plain popup protected void applyTheme(){} //set position public void sublayout(int width, int height){ setExtent(getPreferredWidth(), getPreferredHeight()); setPosition(xOffset,yOffset); layoutDelegate(getPreferredWidth(), getPreferredHeight()); } public int getPreferredWidth() { return popup.getWidth(); } public int getPreferredHeight() { return popup.getHeight(); } vfmPopup = new VerticalFieldManager(USE_ALL_WIDTH){ protected void sublayout(int width, int height){ super.sublayout(width,height); setExtent(wOffset, hOffset); } }; FormattedText message = new FormattedText(text, 25, 180, Field.NON_FOCUSABLE); message.setFont(fontText); message.setColor(Color.WHITE); vfmPopup.add(new BitmapField( new Bitmap(0,25), USE_ALL_WIDTH)); vfmPopup.add(getGifAnimated()); vfmPopup.add(new BitmapField( new Bitmap(0,25), USE_ALL_WIDTH)); vfmPopup.add(message); add(vfmPopup); }

 

 

 

 

Developer
Posts: 238
Registered: ‎08-26-2008
My Device: Not Specified

Re: shadow on popup

public PopupGlobalScreen(int type, String text){

super( new VerticalFieldManager( USE_ALL_WIDTH | USE_ALL_HEIGHT | FIELD_HCENTER | NO_VERTICAL_SCROLL |Field.FOCUSABLE){             

protected void paintBackground(Graphics g){                  

try{                       

g.drawBitmap(0, 0, g.getScreenWidth(), g.getScreenHeight(), popup, 0, 0);                                          

}

catch (Exception e) {                       

System.out.println(e.toString());                       

e.printStackTrace();                  

}            

}                        

});             

 

//create plain popup   

protected void applyTheme(){

}       

 

//set position   

public void sublayout(int width, int height){       

setExtent(getPreferredWidth(), getPreferredHeight());       

setPosition(xOffset,yOffset);       

layoutDelegate(getPreferredWidth(), getPreferredHeight());   

}   

 

public int getPreferredWidth() {       

return popup.getWidth();   

}   

   

public int getPreferredHeight() {       

return popup.getHeight();   

}                 

 

 

vfmPopup = new VerticalFieldManager(USE_ALL_WIDTH){           

protected void sublayout(int width, int height){               

super.sublayout(width,height);               

setExtent(wOffset, hOffset);           

}       

};        

      

FormattedText message = new FormattedText(text, 25, 180, Field.NON_FOCUSABLE);       

message.setFont(fontText);       

message.setColor(Color.WHITE);               

vfmPopup.add(new BitmapField( new Bitmap(0,25), USE_ALL_WIDTH));        

vfmPopup.add(getGifAnimated());      

vfmPopup.add(new BitmapField( new Bitmap(0,25), USE_ALL_WIDTH));        

vfmPopup.add(message);              

add(vfmPopup);                  

}