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
Super Contributor
Achin
Posts: 425
Registered: ‎01-02-2013
My Device: BOLD 9900
My Carrier: sdvsdvsd

how to create a pop up screen like this

i want to create a pop up screen like this, image and then some text as u can see in the pic. 

original.png

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to create a pop up screen like this

Looks fairly straightforward, can you tell us what exactly are you struggling to achieve? 

 

I think you will find some Fields from here useful:

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...

Please use plain text.
Super Contributor
Achin
Posts: 425
Registered: ‎01-02-2013
My Device: BOLD 9900
My Carrier: sdvsdvsd

Re: how to create a pop up screen like this

[ Edited ]

i'll explain you a bit more,,about what i want.. just look at the pic i have my custom pop screen . how can i create pop up screen  like shown in the pic, mean one  side is a pic, and with some text horizonatlly as shown in the pic, i'm working with 5 os

 public class SettingMenu extends PopupScreen{
			 
			 
			 public SettingMenu(){
				 super(new VerticalFieldManager(), Screen.DEFAULT_CLOSE); 
				
				
			
			 
		 }
		 
	}
}

 original.png

 

Please use plain text.
Super Contributor
Achin
Posts: 425
Registered: ‎01-02-2013
My Device: BOLD 9900
My Carrier: sdvsdvsd

Re: how to create a pop up screen like this

plz anyone solve my problem
Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to create a pop up screen like this

The link I pointed you at has ListStyleButtonField which is pretty much what you want I think.  You will have to change it to have the image on the left and then the text. 

 

Alternatively a HorizontalFieldManager with a BitmapField and a LabelField would seem to do the trick, though you will probably have focus indication issues with this approach.  Other people have had this and overcome it - so if you choose this approach and don't like the focus indication, then search the forum for solutions to this. 

Please use plain text.
Super Contributor
Achin
Posts: 425
Registered: ‎01-02-2013
My Device: BOLD 9900
My Carrier: sdvsdvsd

Re: how to create a pop up screen like this

yes , i'm using the second one with HorizontalFieldManager with a BitmapField and a LabelField, and look at the pic jand you right , i have the  focus indication issues, and how to solve this focus issue, should set my HorizontalFieldManager Focusable or something else,,

public class SettingMenu extends PopupScreen{
			 
			 HorizontalFieldManager pophrm,pophrm2,pophrm3,pophrm4;
			
			 public SettingMenu(){
				 super(new VerticalFieldManager(), Screen.DEFAULT_CLOSE); 
				
				 this.setBackground(BackgroundFactory.createSolidTransparentBackground(Color.WHITE, 80));
			
				 setBorder(BorderFactory.createSimpleBorder(new XYEdges(),Border.STYLE_TRANSPARENT));
				
				 pophrm = new HorizontalFieldManager();
				 pophrm2 = new HorizontalFieldManager();
				 pophrm3 = new HorizontalFieldManager();
				 pophrm4 = new HorizontalFieldManager();
				 
				 Bitmap bitmapImagee = Bitmap.getBitmapResource("fav_pressed.png");
			     BitmapField fieldDemo = new BitmapField(bitmapImagee,FOCUSABLE){
			    	 protected boolean navigationClick(int arg0, int arg1) {
							// TODO Auto-generated method stub
							System.out.println("Favourites");
							favrts showfavrt = new favrts();
			                UiApplication.getUiApplication().pushScreen(showfavrt); 
							return true;
						}
			     };   
			     
			     LabelField label = new LabelField(" Favourites"){
			    	 public int getPreferredWidth() {
							// TODO Auto-generated method stub
							return 122;
						}
			    	
			    	 
			     };
			     
			     pophrm.setBorder( BorderFactory.createSimpleBorder( new XYEdges(2, 2, 2, 2),
		                 new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK, Color.BLACK), Border.STYLE_SOLID));
			     
			     pophrm.add(fieldDemo);
			     pophrm.add(label);
			     this.add(pophrm);
			     
			     
			     Bitmap bitmapImagee1 = Bitmap.getBitmapResource("fav_pressed.png");
			     BitmapField fieldDemo1 = new BitmapField(bitmapImagee1,FOCUSABLE){
			    	 protected boolean navigationClick(int arg0, int arg1) {
							// TODO Auto-generated method stub
							System.out.println("Settings");
							MySettings settings = new MySettings();
				            UiApplication.getUiApplication().pushScreen(settings);
							return true;
						}
			     };   
			     
			     LabelField label2 = new LabelField("  Settings"){

					public int getPreferredWidth() {
						// TODO Auto-generated method stub
						return 122;
					}
					
			    	 
			     };
			     pophrm2.setBorder( BorderFactory.createSimpleBorder( new XYEdges(0, 2, 2, 2),
		                 new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK, Color.BLACK), Border.STYLE_SOLID));
			     pophrm2.add(fieldDemo1);
			     pophrm2.add(label2);
			     this.add(pophrm2);
			     
			     
			     Bitmap bitmapImagee3 = Bitmap.getBitmapResource("fav_pressed.png");
			     BitmapField fieldDemo3 = new BitmapField(bitmapImagee3,FOCUSABLE);   
			     
			     LabelField label3 = new LabelField("  Help"){
			    	 public int getPreferredWidth() {
							// TODO Auto-generated method stub
							return 122;
						}

					
			    	 
			     };
			     pophrm3.setBorder( BorderFactory.createSimpleBorder( new XYEdges(0, 2, 2, 2),
		                 new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK, Color.BLACK), Border.STYLE_SOLID));
			     pophrm3.add(fieldDemo3);
			     pophrm3.add(label3);
			     this.add(pophrm3);
			     
			     Bitmap bitmapImagee4 = Bitmap.getBitmapResource("fav_pressed.png");
			     BitmapField fieldDemo4 = new BitmapField(bitmapImagee4,FOCUSABLE);   
			     
			     LabelField label4 = new LabelField("  About"){
			    	 public int getPreferredWidth() {
							// TODO Auto-generated method stub
							return 122;
						}
			    	
			     };
			     pophrm4.setBorder( BorderFactory.createSimpleBorder( new XYEdges(0, 2, 2, 2),
		                 new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK, Color.BLACK), Border.STYLE_SOLID));
			     pophrm4.add(fieldDemo4);
			     pophrm4.add(label4);
			     this.add(pophrm4);
			     
			     
			 }
			
			 public boolean onClose(){
				 UiApplication.getUiApplication().popScreen(this);
				 UiApplication.getUiApplication().popScreen(mymenu);
				 
				 return true;
				 }
			
			 
		 }
		 
	}

 

 

9630.png

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to create a pop up screen like this

You are going back to your old ways here.

 

You might remember I said this:

So sorry, I will not help you in future unless I think you are

(a) asking a valid question,

(b) have tried to find the information for yourself,

(c) have debugged your code, and

(d) have thought about the information you need to post so that you provide all the required information, but only the relevant code.

during this Thread:

http://supportforums.blackberry.com/t5/Java-Development/save-fonts/m-p/2351827#M218229

 

Well, in this case you fail on (b) and (d).  You have provided code that we do not need and you have not done the research.  Please review my previous response. 

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to create a pop up screen like this

Please use plain text.